tag:blogger.com,1999:blog-8472448211262689043.post8495537841726203306..comments2026-01-31T00:32:51.812-08:00Comments on Advanced PHP Tutorial: Absolute path and Relative path file inclusion in PHPLearnphphttp://www.blogger.com/profile/15934446588226257926noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-8472448211262689043.post-45209018640066369432011-01-03T15:59:44.672-08:002011-01-03T15:59:44.672-08:00RE the types of slashes It shouldn&#39;t matter t...RE the types of slashes<br /><br />It shouldn&#39;t matter to windows if you use the forward slash. Although, if you want to be a stickler about it, you can always use the &quot;DIRECTORY_SEPARATOR&quot; constant.<br /><br />require_once(ABSPATH . DIRECTORY_SEPARATOR . &#39;wp-settings.php&#39;);Brent Wonghttps://www.blogger.com/profile/14273804178870499098noreply@blogger.comtag:blogger.com,1999:blog-8472448211262689043.post-54593765782504172082010-12-31T04:20:48.471-08:002010-12-31T04:20:48.471-08:00Just a quick tip, since PHP 5.3 a constant is adde...Just a quick tip, since PHP 5.3 a constant is added: __DIR__ this constant replaces the of dirname(__FILE__);<br /><br />So if you have PHP 5.3 installed use __DIR__.Sjoerd Maessenhttps://www.blogger.com/profile/08617243593537155739noreply@blogger.comtag:blogger.com,1999:blog-8472448211262689043.post-29660312490491163402010-11-18T14:55:39.224-08:002010-11-18T14:55:39.224-08:00Maybe it is better to leave the definition as: de...Maybe it is better to leave the definition as:<br /><br />define(‘ABSPATH’, dirname(__FILE__));<br /><br />and add the slash manually when needed, depending on the operating system, as windows expects a &quot;\&quot; while unix expects a &quot;/&quot;.<br /><br />Linux:<br /><br />require_once(ABSPATH.’/wp-settings.php’);<br /><br />Windows:<br />require_once(ABSPATH.’\wp-settings.php’);Guvenc Kaplanhttps://www.blogger.com/profile/13616145804066119881noreply@blogger.com