<?xml version="1.0" encoding="UTF-8"?><rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
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/"
> <channel><title>Comments on: Howto: PHP setup include_path</title> <atom:link href="http://www.cyberciti.biz/faq/how-do-i-set-php-include-path-in-php-ini-file/feed/" rel="self" type="application/rss+xml" /><link>http://www.cyberciti.biz/faq/how-do-i-set-php-include-path-in-php-ini-file/</link> <description>Every answer asks a more beautiful question.</description> <lastBuildDate>Fri, 10 Feb 2012 19:55:56 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>By: tim</title><link>http://www.cyberciti.biz/faq/how-do-i-set-php-include-path-in-php-ini-file/#comment-64668</link> <dc:creator>tim</dc:creator> <pubDate>Mon, 21 Nov 2011 08:48:46 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/how-do-i-set-php-include-path-in-php-ini-file/#comment-64668</guid> <description>Simple solution...thanks for sharing.</description> <content:encoded><![CDATA[<p>Simple solution&#8230;thanks for sharing.</p> ]]></content:encoded> </item> <item><title>By: Josh</title><link>http://www.cyberciti.biz/faq/how-do-i-set-php-include-path-in-php-ini-file/#comment-63298</link> <dc:creator>Josh</dc:creator> <pubDate>Sat, 08 Oct 2011 11:15:49 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/how-do-i-set-php-include-path-in-php-ini-file/#comment-63298</guid> <description>Hi i am new to all this so please explain like i am a child,
Basic i have a user and video folders creater in my registration and i need to access it on my client a.php &amp; b.php on two different folder
How do i setting include path to access the video on registration to be seen on a.php and b.php
Many thanks</description> <content:encoded><![CDATA[<p>Hi i am new to all this so please explain like i am a child,</p><p>Basic i have a user and video folders creater in my registration and i need to access it on my client a.php &amp; b.php on two different folder</p><p>How do i setting include path to access the video on registration to be seen on a.php and b.php<br
/> Many thanks</p> ]]></content:encoded> </item> <item><title>By: tolu</title><link>http://www.cyberciti.biz/faq/how-do-i-set-php-include-path-in-php-ini-file/#comment-63041</link> <dc:creator>tolu</dc:creator> <pubDate>Sat, 01 Oct 2011 11:40:33 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/how-do-i-set-php-include-path-in-php-ini-file/#comment-63041</guid> <description>Perfect! Just solved my problem of setting my include path..</description> <content:encoded><![CDATA[<p>Perfect! Just solved my problem of setting my include path..</p> ]]></content:encoded> </item> <item><title>By: dummy</title><link>http://www.cyberciti.biz/faq/how-do-i-set-php-include-path-in-php-ini-file/#comment-45892</link> <dc:creator>dummy</dc:creator> <pubDate>Mon, 08 Feb 2010 11:50:00 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/how-do-i-set-php-include-path-in-php-ini-file/#comment-45892</guid> <description>do u know how to include a folder (consist lot php files) into another php file?
Let&#039;s says abc/ice, ice is a folder with lot php files inside.
Here I got another abc/ice2/index.php. How to include all files in ice to index.php?</description> <content:encoded><![CDATA[<p>do u know how to include a folder (consist lot php files) into another php file?</p><p>Let&#8217;s says abc/ice, ice is a folder with lot php files inside.</p><p>Here I got another abc/ice2/index.php. How to include all files in ice to index.php?</p> ]]></content:encoded> </item> <item><title>By: finau</title><link>http://www.cyberciti.biz/faq/how-do-i-set-php-include-path-in-php-ini-file/#comment-43991</link> <dc:creator>finau</dc:creator> <pubDate>Tue, 06 Oct 2009 01:27:19 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/how-do-i-set-php-include-path-in-php-ini-file/#comment-43991</guid> <description>instead of using the include_path, you can use this function.
&lt;pre&gt;
function includeFile($file_name){
$dir = array(&#039;./&#039;, &#039;lib/&#039;, &#039;db/&#039;, &#039;student/&#039;);    //&lt;-- put here your website directory you want to include
$level = array(&#039;&#039;, &#039;/&#039;, &#039;../&#039;, &#039;../../&#039;);    //&lt;-- you can add more deep level in this array
$ini_path = array();
foreach($dir as $p){
foreach($level as $l){
$file = $l.$p.$file_name;
if(file_exists($file)){
include_once($file);
return;
}
}
}
} //end function includeFile
//example of using it
includeFile(&#039;html.php&#039;);
includeFile(&#039;libpage.php&#039;);&lt;/pre&gt;</description> <content:encoded><![CDATA[<p>instead of using the include_path, you can use this function.</p><pre>
function includeFile($file_name){
   $dir = array('./', 'lib/', 'db/', 'student/');    //&lt;-- put here your website directory you want to include
   $level = array(&#039;&#039;, &#039;/&#039;, &#039;../&#039;, &#039;../../&#039;);    //&lt;-- you can add more deep level in this array
   $ini_path = array();
   foreach($dir as $p){
      foreach($level as $l){
         $file = $l.$p.$file_name;
         if(file_exists($file)){
            include_once($file);
            return;
         }
      }
   }
} //end function includeFile
//example of using it
includeFile(&#039;html.php&#039;);
includeFile(&#039;libpage.php&#039;);</pre>]]></content:encoded> </item> <item><title>By: Vivek Gite</title><link>http://www.cyberciti.biz/faq/how-do-i-set-php-include-path-in-php-ini-file/#comment-40876</link> <dc:creator>Vivek Gite</dc:creator> <pubDate>Tue, 24 Mar 2009 11:08:04 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/how-do-i-set-php-include-path-in-php-ini-file/#comment-40876</guid> <description>If something is commented, php will use default value.</description> <content:encoded><![CDATA[<p>If something is commented, php will use default value.</p> ]]></content:encoded> </item> <item><title>By: sanjay Katiyar</title><link>http://www.cyberciti.biz/faq/how-do-i-set-php-include-path-in-php-ini-file/#comment-40873</link> <dc:creator>sanjay Katiyar</dc:creator> <pubDate>Tue, 24 Mar 2009 06:00:51 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/how-do-i-set-php-include-path-in-php-ini-file/#comment-40873</guid> <description>Vivek,
In my php.ini (Fedora 8 server) file inlcude_path is commented but in the phpinfo() says
include_path  &quot;.:/usr/share/pear:/usr/share/php&quot; .
From where it is getting these values?</description> <content:encoded><![CDATA[<p>Vivek,</p><p>In my php.ini (Fedora 8 server) file inlcude_path is commented but in the phpinfo() says<br
/> include_path  &#8220;.:/usr/share/pear:/usr/share/php&#8221; .<br
/> From where it is getting these values?</p> ]]></content:encoded> </item> </channel> </rss>
