eirinikos
-
Posts
3 -
Joined
-
Last visited
Never
Posts posted by eirinikos
-
-
sure..
[code]
<?php
echo getcwd():
?>[/code]
[b]Output:[/b]
[code]
C:\Program Files\Apache Software Foundation\Apache2.2
[/code]
the location of the file is C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\test.php
the doc root of the web server is C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\ -
Hi.. I'm having a strange problem where the current working directory is showing one folder up from where it should be.
Im running the latest apache (2.2) and PHP 5 on windowsXP
My doc root is "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs"
Whenever I run a php script in the htdocs folder and echo getcwd() I get:
C:\Program Files\Apache Software Foundation\Apache2.2
I dont get it..the include path is set to "." for relative paths..
I tried setting the doc root in the php.ini file also
I dont know what else the problem can be.
getcwd shows that php thinks its in the wrong folder...
in PHP Coding Help
Posted
[code]<script language="php">
echo getcwd();
echo "<BR><BR>";
echo $_SERVER["DOCUMENT_ROOT"];
echo " <BR><BR> " . $_SERVER["SCRIPT_FILENAME"];
</script>[/code]
Output:
[code]C:\Program Files\Apache Software Foundation\Apache2.2
C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/
C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/info.php[/code]
I am using the apache module.