<?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>Perplexed Labs &#187; getcwd</title>
	<atom:link href="http://blog.perplexedlabs.com/tag/getcwd/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.perplexedlabs.com</link>
	<description>web development war stories from the frontlines to the backend</description>
	<lastBuildDate>Sat, 24 Jul 2010 16:27:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>PHP Document Root Trick</title>
		<link>http://blog.perplexedlabs.com/2008/02/01/php-test/</link>
		<comments>http://blog.perplexedlabs.com/2008/02/01/php-test/#comments</comments>
		<pubDate>Fri, 01 Feb 2008 19:16:57 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[getcwd]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://perplexedlabs.com/2008/02/01/php-test/</guid>
		<description><![CDATA[Create and place this file in your document root, include it in all other files to easily have access to the directory your site is located without using clumsy and unreliable $_SERVER or $_ENV entries. _require.php: &#60;?php $oldCwd = getcwd(); chdir(dirname(__FILE__)); define('SITE_DOCROOT', getcwd()); chdir($oldCwd); ?&#62; Related posts:PHP Dynamic JavaScript SCRIPT Insertion for Embedding Deployment Using [...]


Related posts:<ol><li><a href='http://blog.perplexedlabs.com/2009/02/05/dynamic-javascript-script-insertion-for-embedding/' rel='bookmark' title='Permanent Link: PHP Dynamic JavaScript SCRIPT Insertion for Embedding'>PHP Dynamic JavaScript SCRIPT Insertion for Embedding</a></li>
<li><a href='http://blog.perplexedlabs.com/2010/02/08/deployment-using-capistrano-and-webistrano-via-rails-and-phusion-passenger/' rel='bookmark' title='Permanent Link: Deployment Using Capistrano / Webistrano via Rails / Phusion Passenger'>Deployment Using Capistrano / Webistrano via Rails / Phusion Passenger</a></li>
<li><a href='http://blog.perplexedlabs.com/2008/12/21/php-sessions-on-localhost/' rel='bookmark' title='Permanent Link: PHP Sessions on localhost'>PHP Sessions on localhost</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Create and place this file in your document root, include it in all other files to easily have access to the directory your site is located without using clumsy and unreliable $_SERVER or $_ENV entries.</p>
<p>_require.php:</p>
<pre class="brush: php;">
&lt;?php
$oldCwd = getcwd();
chdir(dirname(__FILE__));
define('SITE_DOCROOT', getcwd());
chdir($oldCwd);
?&gt;
</pre>


<p>Related posts:<ol><li><a href='http://blog.perplexedlabs.com/2009/02/05/dynamic-javascript-script-insertion-for-embedding/' rel='bookmark' title='Permanent Link: PHP Dynamic JavaScript SCRIPT Insertion for Embedding'>PHP Dynamic JavaScript SCRIPT Insertion for Embedding</a></li>
<li><a href='http://blog.perplexedlabs.com/2010/02/08/deployment-using-capistrano-and-webistrano-via-rails-and-phusion-passenger/' rel='bookmark' title='Permanent Link: Deployment Using Capistrano / Webistrano via Rails / Phusion Passenger'>Deployment Using Capistrano / Webistrano via Rails / Phusion Passenger</a></li>
<li><a href='http://blog.perplexedlabs.com/2008/12/21/php-sessions-on-localhost/' rel='bookmark' title='Permanent Link: PHP Sessions on localhost'>PHP Sessions on localhost</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.perplexedlabs.com/2008/02/01/php-test/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
