Hi,
I've installed Apache (WAMP install) so I can edit and test my web
site on my home computer. In general php code seems to work, but I
can't access Apache variables such as PATH or SCRIPT_NAME.
The code below works perfectly when I upload it to my webhost server.
However, at home, everything processes corectly except the
environmental variables are blank.
Any ideas?
Thanks
Bruce
<html>
<head>
<title>Test3.ph p</title>
</head>
<body>
<?php
print ( date("g:i A - l, M d, Y"));
$a="hello world";
?>
<br>
<?php
echo '$a = '.$a."\n";
echo '<br>';
echo 'Script Filename: '.$SCRIPT_FILEN AME."\n";
echo '<br>';
echo 'Script name : '.$PHP_SELF."\n ";
echo '<br>';
echo 'doc_root : '.$DOCUMENT_ROO T."\n";
echo '<br>';
echo 'Path name : '.$PATH."\n";
echo '<br>';
echo 'OSTYPE : '.$OSTYPE."\n";
echo '<br>';
//phpinfo(); //works fine
?>
</body>
</html>
I've installed Apache (WAMP install) so I can edit and test my web
site on my home computer. In general php code seems to work, but I
can't access Apache variables such as PATH or SCRIPT_NAME.
The code below works perfectly when I upload it to my webhost server.
However, at home, everything processes corectly except the
environmental variables are blank.
Any ideas?
Thanks
Bruce
<html>
<head>
<title>Test3.ph p</title>
</head>
<body>
<?php
print ( date("g:i A - l, M d, Y"));
$a="hello world";
?>
<br>
<?php
echo '$a = '.$a."\n";
echo '<br>';
echo 'Script Filename: '.$SCRIPT_FILEN AME."\n";
echo '<br>';
echo 'Script name : '.$PHP_SELF."\n ";
echo '<br>';
echo 'doc_root : '.$DOCUMENT_ROO T."\n";
echo '<br>';
echo 'Path name : '.$PATH."\n";
echo '<br>';
echo 'OSTYPE : '.$OSTYPE."\n";
echo '<br>';
//phpinfo(); //works fine
?>
</body>
</html>
Comment