PHP $_SERVER 現在URLの取得

  • 2010年02月07日
  •  | PHP, Tips
  •  | 

$_SERVER['HTTP_HOST']
でサーバーアドレスを取得。

$_SERVER['PHP_SELF']

$_SERVER["REQUEST_URI"]
でドメインからの下の現在の位置を取得。

これで、実行中のPHPのアドレスが取得できます。

$http = ‘http://pmtea.net’;
define(‘HtmlUrl’,$http.$_SERVER['REQUEST_URI']);
echo HtmlUrl;

の様に表示するか・・・汎用で使うなら・・・$_SERVER['HTTP_HOST']を加えて。

$http = ‘http://’;
define(‘HtmlUrl’,$http.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);
echo HtmlUrl;

とすれば完了ぉ〜

for Win illustrator 10とPhotoShop でMSフォントが文字化けする。

現象はWinXP + illustrato10r&PhotoShop7.01で確認。

まず、[コントロールパネル]→[プログラムの追加と削除]
[プログラムの追加と削除]→(更新プログラムの表示) をチェック入れる。
中からJIS2004対応フォントが悪さしている様なので、こいつを削除。

Microsoft MS ゴシックおよび MS 明朝 JIS2004 対応フォント (KB927489)

次に、illustratorとPhotoShopのフォント情報をリフレッシュします。

「AdobeFnt」っとつくファイルを削除します。
『*AdobeFnt*』 で検索、AdobeFnt05.lstとかAdobeFnt06.lstとか出てくるので、手当たり次第削除。

アプリケーションを再起動すると、あら不思議直ってるはず・・・直ってないと知らんw

Macの場合

http://support.adobe.co.jp/faq/qadoc/AJ25.nsf/da5793198a1f51c94925696900084021/61d8106c20d5856449256bd1001b7302?OpenDocument

『nt05』と付くファイルを検索して手当たり次第削除で直るって記事もあった。
試してくださいな。

CSSコーディング 〜リセット2〜

  • 2009年10月01日
  •  | CSS, Tips
  •  | 

前回作ったリセットが、NNやFireFox2 for Macなどで問題があるので、作り直しました。

フォント周りもどうにか詰めたいのですが、まぁ間違ってもいないみたいなので…
あと、MTベースのclearfixも修正しました。

/* 基本フォント —————————— */

html {
background: #009900;
}

body{
font-family: Arial, Helvetica, Verdana, “ヒラギノ角ゴPro W3″, “Hiragino Kaku Gothic Pro”, Osaka, “メイリオ”, Meiryo, “MS Pゴシック”, sans-serif;
background: #FFFFFF;
font-size: 12px;
line-height: 1.5;
}

h1,h2,h3,h4,h5,h6 {
font-size:100%;
font-weight:normal;
}

input,textarea,select {
font-size: 100%;
}

/*\*/
* html body {
font-size: 75%;
}
* html table {
font-size: 100%;
line-height: 1.5;
}
*:first-child+html body {
font-size: 75%;
}
/**/

/* 基本タグ —————————— */

body,div,
dl,dt,dd,ul,ol,li,
h1,h2,h3,h4,h5,h6,
p,blockquote,pre,cite,code,caption,
form,fieldset,legend,input,textarea,select,option,label {
margin:0;
padding:0;
}
table {
border-collapse:collapse;
border-spacing:0;
}
fieldset,img {
border:0;
}
address,caption,cite,code,dfn,em,strong,th,var {
font-style:normal;
font-weight:normal;
}

ol,
ul {
list-style: none;
}

li img,
dt img {
vertical-align: bottom;
}
caption,th {
text-align:left;
}
q:before,q:after {
content:”;
}

object,
embed {
vertical-align: top;
}

abbr,acronym {
border:0;
}

/* ————————————————————————————–
float解除
————————————————————————————— */

.clearfix:after {
clear:both;
content:”.”;
display:block;
height:0;
visibility:hidden;
}
.clearfix {
display:inline-block;
}
* html .clearfix {
height:1%;
}
.clearfix {
display:block;
}

/* MacIE begin \*/
*+html .clearfix{height: 1%;}
* html .clearfix{height: 1%;}
.clearfix{display: block;}
/* Mac IE end */

Bad Behavior has blocked 1 access attempts in the last 7 days.