Wikus Moller wrote:
Hi.
I have a windows server and I know this issue has been dealt with
before but I can't find it, I want to include a file from a directory
beneath or aside my home directory.
Can I use the C:\directory\anotherdirectory\file.php in the include
function like include "C:\directory\anotherdirectory\file.php"; or do
I need more code to make it work? I am sure I do. The directory would
be aside my home directory.
That should work fine in theory.
I'd suggest using the constant 'DIRECTORY_SEPARATOR' instead:
$path = 'c:' . DIRECTORY_SEPARATOR . 'directory' .....
so you don't have to worry about escaping backslashes, otherwise you
have to write it as:
c:\\directory\\ ...
or
c:/directory/....
Both of those should work ok but using the constant you shouldn't have
any problems with forgetting about escaping a \ .
--
Postgresql & php tutorials
http://www.designmagick.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php