<?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: determining the application root path and url in php</title>
	<atom:link href="http://www.gsdesign.ro/blog/determining-the-application-root-path-and-url-in-php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.gsdesign.ro/blog/determining-the-application-root-path-and-url-in-php/</link>
	<description>Just another developer blog</description>
	<lastBuildDate>Sat, 11 Feb 2012 02:17:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: php developers</title>
		<link>http://www.gsdesign.ro/blog/determining-the-application-root-path-and-url-in-php/comment-page-1/#comment-7901</link>
		<dc:creator>php developers</dc:creator>
		<pubDate>Sat, 28 May 2011 07:25:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.gsdesign.ro/blog/?p=283#comment-7901</guid>
		<description> It’s nice to find a good article. I really enjoy lots of the blog posts on your web site.</description>
		<content:encoded><![CDATA[<p> It’s nice to find a good article. I really enjoy lots of the blog posts on your web site.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Clinton</title>
		<link>http://www.gsdesign.ro/blog/determining-the-application-root-path-and-url-in-php/comment-page-1/#comment-7863</link>
		<dc:creator>Clinton</dc:creator>
		<pubDate>Fri, 18 Feb 2011 13:44:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.gsdesign.ro/blog/?p=283#comment-7863</guid>
		<description>I also had a major struggle with this issue and found that the best solution was to use a relative root conversion to the absolute root.  The code follows.  I hope this helps someone in the future..
    Clinton

/**
 * Convert a relative address to an absolute address
 */
function r2aAddress($rel){
	$x1 = $_SERVER[&#039;DOCUMENT_ROOT&#039;];
	$n1 = strlen($x1);
	$x2 = realpath($rel);
	$n2 = strlen($x2);
	$xdiff = substr($x2,$n1,$n2-$n1);
	return str_replace(&quot;\&quot;,&quot;/&quot;,$xdiff);
}</description>
		<content:encoded><![CDATA[<p>I also had a major struggle with this issue and found that the best solution was to use a relative root conversion to the absolute root.  The code follows.  I hope this helps someone in the future..<br />
    Clinton</p>
<p>/**<br />
 * Convert a relative address to an absolute address<br />
 */<br />
function r2aAddress($rel){<br />
	$x1 = $_SERVER['DOCUMENT_ROOT'];<br />
	$n1 = strlen($x1);<br />
	$x2 = realpath($rel);<br />
	$n2 = strlen($x2);<br />
	$xdiff = substr($x2,$n1,$n2-$n1);<br />
	return str_replace(&#8220;\&#8221;,&#8221;/&#8221;,$xdiff);<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gabi Solomon</title>
		<link>http://www.gsdesign.ro/blog/determining-the-application-root-path-and-url-in-php/comment-page-1/#comment-7253</link>
		<dc:creator>Gabi Solomon</dc:creator>
		<pubDate>Thu, 18 Dec 2008 09:17:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.gsdesign.ro/blog/?p=283#comment-7253</guid>
		<description>its just a combination of simple functions from php :D</description>
		<content:encoded><![CDATA[<p>its just a combination of simple functions from php <img src='http://www.gsdesign.ro/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: URL Directory</title>
		<link>http://www.gsdesign.ro/blog/determining-the-application-root-path-and-url-in-php/comment-page-1/#comment-7251</link>
		<dc:creator>URL Directory</dc:creator>
		<pubDate>Thu, 18 Dec 2008 06:51:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.gsdesign.ro/blog/?p=283#comment-7251</guid>
		<description>These codes look so alien to me.</description>
		<content:encoded><![CDATA[<p>These codes look so alien to me.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

