When I run the following code, I get "Undefined variable: localPath"
error. I do not understand why? It seems simple enough...but I am new
to PHP so any help is appreciated.
I am running PHP 5.2.5 on an XAMPP installation on Win XP/Pro.
$localpath=gete nv('SCRIPT_NAME ');
$absolutepath=r ealpath($localP ath);
// a fix for Windows slashes
$absolutepath=s tr_replace("\\" ,"/",$absolutepath );
$docroot=substr ($absolutepath, 0,strpos($absol utepath,$localp ath));
TIA,
John
error. I do not understand why? It seems simple enough...but I am new
to PHP so any help is appreciated.
I am running PHP 5.2.5 on an XAMPP installation on Win XP/Pro.
$localpath=gete nv('SCRIPT_NAME ');
$absolutepath=r ealpath($localP ath);
// a fix for Windows slashes
$absolutepath=s tr_replace("\\" ,"/",$absolutepath );
$docroot=substr ($absolutepath, 0,strpos($absol utepath,$localp ath));
TIA,
John
Comment