Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- trouble with include files
September 6, 2006, 8:48 pm
rate this thread
Here's my files and directories ...
On hello.php, I have the line
However, I would like the behavior to be that the included file is the
one that lives at the same level as "hello.php". I'm noticing that the
"mirror_site/hello.php" file is including the "util_fns.inc" top level
file when I want it to include the "mirror_site/util_fns.inc" file.
How can I enforce this behavior?
I would prefer not to create two separate hello.php files.
Thanks for any assistance. Using PHP 4.3 if that is useful, - Dave
Re: trouble with include files
$dir = getcwd();
and then use:
Something like this would work.
Ah, by the way, don't let the extension be '.inc', put it with '.php'
in the end, if someone access your file in the browser, the browser
will display it as plain text letting everyone see your script.
- » Uploading a pre-defined filename to a server with PHP
- — Previous thread in » PHP Scripting Forum