[thelist] Trouble with PHP Include

Santilal Parbhu santilal at scorpioneng.co.nz
Fri Feb 14 21:59:41 CST 2014



I am having all sorts of trouble with a PHP include.  I have previously had
this script working on a hosted server, but for some reason I can't get it
to work on my Windows XAMPP server.  I have a script with the following:


      if($selectedsport == alexbasketball){



include "../../functions/commonparameters.php";

include "../../functions/alexbasketballparameters.php";


$_SESSION['clubdraws'] = "viewdraw2.php";

header ('Location: ../centralotagogroup/noticeboard.php');




The $_SESSION['TESTPOINT'] = "???"; is just to check if the code is being
executed, and I can confirm that it is.  Neither of the called scripts
appears to run.  I suspect the reason is the same for both of them.  So I
tried to run some tests on one of them.


The called script (commonparameters.php) is



//This is where the common parameters are set.


//07/01/09 - File created.



//The following parameters are for web.



$clubresults = "pointstable.php";

$_SESSION['clubdraws'] = "viewdraw2.php";


#$clubdraws = "viewdraw2.php";


$clublogin = "../../login_files/login.php";




Again I am looking for $_SESSION['TESTPOINT'] to change to yes, and I can
confirm that it is not changing.


The calling script is at htdocs\gameon\regions\selectsport.php and the
called script is at htdocs\gameon\functions\commonparameters.php.  By
observing the variable $_SESSION['TESTPOINT'] I can see that the calling
script is running, but it appears that the called script is not running.  I
thought I had the path correct, but I can't see why else the called script
does not run.  I hope I have given enough information.




Kind regards,




Santilal Parbhu

Scorpion Engineering Limited

PO Box 171


Phone: +64 3 440 2100

Mobile: +64 21 2655991

Email:  <mailto:santilal at scorpioneng.co.nz> santilal at scorpioneng.co.nz

Web:  <http://www.scorpioneng.co.nz> www.scorpioneng.co.nz

More information about the thelist mailing list