note 17701 deleted from function.include by irc-html

From: Date: Sat, 19 Jan 2002 19:33:54 +0000
Subject: note 17701 deleted from function.include by irc-html
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-25255@lists.php.net to get a copy of this message
Me beeing a n00b in PHP I tried a totally different approach. Beeing an ASP developer to I am used to be able to use relative paths when using include so I began to device a method of beeing able to use this kind of including. Allthough many of the methods mentioned above would suit most users my way of doing would be: $web_root = substr($PATH_TRANSLATED,0,strrpos($PATH_TRANSLATED,"\\")); This will get your root directory for the current website/project then you can simply add the relative path to it by using: <? include($web_root . "\includes\functions.php"); ?>

« previous php.notes (#25255) next »