surfthenet Posted February 21, 2010 Share Posted February 21, 2010 Hi, I'm very very new to php coding and I'm try to get this existing code to work below but it does not seem to work on the new host. This codes presently works on 1and1 and I'm in the process of moving it to a new web host. But for some reason it won’t work on the new web host (Vidahost) but does work on the existing (1and1). Basically what it should do is give me the absolute path of the script that im executing but it can’t be as the If statement below should show the other href links, but does not when the page loads. I should see something like this on the page • Jobs • Add Job • Archives But I only get this • Jobs I hope this makes sense and I hope someone can help me please. Many thanks. Many thanks in advance CODE..... $location=substr_replace($_SERVER['SCRIPT_FILENAME'], "", 0, strlen(CMS_FILEPATH)); //print CMS_FILEPATH; //print $location; ?> <!-- start section --> <tr> <td><font color="#FFFFFF">•</font> <a href="job_list.php">Jobs</a></td> </tr> <? if (($location=="job_list.php") || ($location=="job_edit.php") || ($location=="job_add.php") || ($location=="job_list_archive.php")) { ?> <tr align="right"> <td> <table width="90%" border="0"> <tr> <td height="15"><font color="#FFFFFF">•</font> <a href="job_add.php">Add Job</a> </td> </tr> <tr> <td height="15"><font color="#FFFFFF">•</font> <a href="job_list_archive.php">Archives</a> </td> </tr> </table></td> </tr> <? Link to comment https://forums.phpfreaks.com/topic/192843-help-with-_serverscript_filename-not-working-i-think/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.