Hi. I'm trying to use root directory in my php script. But it seems that '/' doesn't work as in UNIX. Could someone help me out? I'm using Apache for Window98 and PHP3. Thanks.
Zhuo
I wrote a script lately (on a Win98 machine) that had to open a little dbf-file located at c:\test.dbf .
This line worked: $db = dbase_open("\test.dbf",0);
So I think you should use a back slash instead of a slash.
Thanks. But by root directory I mean "c:\program files\apache group\apache\htdocs". Shall I use $PHP_DOCUMENT_ROOT? How to use it?
🙂
Wait, so how DO you use it? Thx
To refer to root directory in 'include', use $DOCUMENT_ROOT. e.g. include "$DOCUMENT_ROOT/header.inc.php";
To refer to it in a link, use '/' as in UNIX. e.g. <a href="/showheader.php">.