<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
		xmlns:xhtml="http://www.w3.org/1999/xhtml"
>

<channel>
	<title>PmTea &#187; PHP</title>
	<atom:link href="http://pmtea.net/blog/category/tips/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://pmtea.net/blog</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Sat, 06 Feb 2010 16:50:58 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://pmtea.net/blog/category/tips/php/feed/" />
		<item>
		<title>PHP $_SERVER 現在URLの取得</title>
		<link>http://pmtea.net/blog/2010/02/07/php-_server-%e7%8f%be%e5%9c%a8url%e3%81%ae%e5%8f%96%e5%be%97/</link>
		<comments>http://pmtea.net/blog/2010/02/07/php-_server-%e7%8f%be%e5%9c%a8url%e3%81%ae%e5%8f%96%e5%be%97/#comments</comments>
		<pubDate>Sat, 06 Feb 2010 16:50:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://pmtea.net/blog/?p=16</guid>
		<description><![CDATA[$_SERVER['HTTP_HOST']
でサーバーアドレスを取得。
$_SERVER['PHP_SELF']
か
$_SERVER["REQUEST_URI"]
でドメインからの下の現在の位置を取得。
これで、実行中 [...]]]></description>
			<content:encoded><![CDATA[<p>$_SERVER['HTTP_HOST']<br />
でサーバーアドレスを取得。</p>
<p>$_SERVER['PHP_SELF']<br />
か<br />
$_SERVER["REQUEST_URI"]<br />
でドメインからの下の現在の位置を取得。</p>
<p>これで、実行中のPHPのアドレスが取得できます。</p>
<p>$http = &#8216;http://pmtea.net&#8217;;<br />
define(&#8216;HtmlUrl&#8217;,$http.$_SERVER['REQUEST_URI']);<br />
echo HtmlUrl;</p>
<p>の様に表示するか･･･汎用で使うなら･･･$_SERVER['HTTP_HOST']を加えて。</p>
<p>$http = &#8216;http://&#8217;;<br />
define(&#8216;HtmlUrl&#8217;,$http.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);<br />
echo HtmlUrl;</p>
<p>とすれば完了ぉ〜</p>
]]></content:encoded>
			<wfw:commentRss>http://pmtea.net/blog/2010/02/07/php-_server-%e7%8f%be%e5%9c%a8url%e3%81%ae%e5%8f%96%e5%be%97/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://pmtea.net/blog/2010/02/07/php-_server-%e7%8f%be%e5%9c%a8url%e3%81%ae%e5%8f%96%e5%be%97/" />
	</item>
	</channel>
</rss>
