Anthony Baker wrote:
I often use PHP includes in my files to pull in assets, but I hard code
the relative path to the root html directory for the sites that I'm
working on in each file. Example below:
While I happen to think using include_path and $_SERVER is a better
solution to setting up
* Thus wrote Anthony Baker:
Hey Folks,
Hoping someone can aid me with a newbie-ish question.
I often use PHP includes in my files to pull in assets, but I hard code
the relative path to the root html directory for the sites that I'm
working on in each file. Example below:
?php
Hey Folks,
Hoping someone can aid me with a newbie-ish question.
I often use PHP includes in my files to pull in assets, but I hard code
the relative path to the root html directory for the sites that I'm
working on in each file. Example below:
?php
$path =
On Tuesday 21 December 2004 04:41, Anthony Baker wrote:
Either that, or is there a way to call this variable from the server
itself so that it's automatically -- and correctly -- set?
Use a combination of one or more items from $_SERVER.
--
Jason Wong - Gremlins Associates - www.gremlins.biz
-
From: Anthony Baker [mailto:[EMAIL PROTECTED]
Sent: Monday, December 20, 2004 12:41 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Setting or Getting Relative Path for PHP Includes
Hey Folks,
Hoping someone can aid me with a newbie-ish question.
I often use PHP includes in my files to pull in assets
Can use a directive on your .htaccess:
php_value include_path /your/include/path/here
This can also be set on your httd.conf in a virtual server basis. If
you have access to php.ini is better to set the include there.
Regards,
Jordi.
On Mon, 20 Dec 2004 12:41:06 -0800, Anthony Baker
[EMAIL
6 matches
Mail list logo