<?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/"
	>

<channel>
	<title>include &#8211; トモデジ  tomodigi.com</title>
	<atom:link href="https://tomodigi.com/tag/include/feed/" rel="self" type="application/rss+xml" />
	<link>https://tomodigi.com</link>
	<description>デジタルもアナログも</description>
	<lastBuildDate>Sat, 24 Sep 2011 03:54:32 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.3</generator>
	<item>
		<title>異なる階層から、ライブラリを読み込む (PHP)</title>
		<link>https://tomodigi.com/web/%e7%95%b0%e3%81%aa%e3%82%8b%e9%9a%8e%e5%b1%a4%e3%81%8b%e3%82%89%e3%80%81%e3%83%a9%e3%82%a4%e3%83%96%e3%83%a9%e3%83%aa%e3%82%92%e8%aa%ad%e3%81%bf%e8%be%bc%e3%82%80-php/</link>
					<comments>https://tomodigi.com/web/%e7%95%b0%e3%81%aa%e3%82%8b%e9%9a%8e%e5%b1%a4%e3%81%8b%e3%82%89%e3%80%81%e3%83%a9%e3%82%a4%e3%83%96%e3%83%a9%e3%83%aa%e3%82%92%e8%aa%ad%e3%81%bf%e8%be%bc%e3%82%80-php/#respond</comments>
		
		<dc:creator><![CDATA[Tomo]]></dc:creator>
		<pubDate>Sun, 07 Mar 2010 14:23:06 +0000</pubDate>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[WEB]]></category>
		<category><![CDATA[get_include_path]]></category>
		<category><![CDATA[include]]></category>
		<category><![CDATA[ディレクトリ]]></category>
		<guid isPermaLink="false">http://www.tomodigi.com/?p=42</guid>

					<description><![CDATA[特定のディレクトリにライブラリ等を保存している場合、異なる階層から、includeしたいときがあります。 例えば、 /home/example/www 以下に /lib /a/b /c などがあり、/a/bや/cなど階層 &#8230; <a href="https://tomodigi.com/web/%e7%95%b0%e3%81%aa%e3%82%8b%e9%9a%8e%e5%b1%a4%e3%81%8b%e3%82%89%e3%80%81%e3%83%a9%e3%82%a4%e3%83%96%e3%83%a9%e3%83%aa%e3%82%92%e8%aa%ad%e3%81%bf%e8%be%bc%e3%82%80-php/" class="more-link">続きを読む <span class="screen-reader-text">異なる階層から、ライブラリを読み込む (PHP)</span> <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p>特定のディレクトリにライブラリ等を保存している場合、異なる階層から、includeしたいときがあります。<br />
例えば、<br />
/home/example/www<br />
以下に<br />
/lib<br />
/a/b<br />
/c<br />
などがあり、/a/bや/cなど階層が異なるディレクトリにあるPHPスクリプトから/lib内のライブラリを読み込みたい場合は、</p>
<pre>&lt;?php
$lib = $_SERVER['DOCUMENT_ROOT'] . "/lib";
set_include_path(get_include_path() . PATH_SEPARATOR . $lib);
include( "hoge.php" );
?&gt;</pre>
<p>でincludeすることができます。<br />
MobableTypeなど、記事をディレクトリで管理する場合などで、共通に使用できます。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://tomodigi.com/web/%e7%95%b0%e3%81%aa%e3%82%8b%e9%9a%8e%e5%b1%a4%e3%81%8b%e3%82%89%e3%80%81%e3%83%a9%e3%82%a4%e3%83%96%e3%83%a9%e3%83%aa%e3%82%92%e8%aa%ad%e3%81%bf%e8%be%bc%e3%82%80-php/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
