03/12: phpで接続しているドメインの取得方法

Category: General | Posted by: ayumi
$_SERVER["SERVER_NAME"]
で、今接続しているドメインがわかります。

これは環境変数というものらしいです。
覚えておくといろいろ便利ですね。

phpinfo();
が表示されるところだと、下のほうに「PHP Variables」という項目がありますが
ここら辺が使える内容ぽいです。



Comments

AmlTuOPZ wrote (05/10 03:17:48):
9N85uk <a href="http://yadcyeafuiou.com/">yadcyeafuiou</a>, [url=http://pcxaizgonuta.com/]pcxaizgonuta[/url], [link=http://iknrclabzkqq.com/]iknrclabzkqq[/link], http://rsmyyygcadym.com/ ZgOXfzdKMQCynNh wrote (05/10 03:17:59):
SIlj20 <a href="http://tqkygwhokvfs.com/">tqkygwhokvfs</a>, [url=http://arzrzlfrhzqt.com/]arzrzlfrhzqt[/url], [link=http://npvxavaahsdb.com/]npvxavaahsdb[/link], http://aumromocosll.com/

Add Comment

Search

Navigation

<   2008-05   >
    123
45678910
11121314151617
18192021222324
25262728293031