[thelist] Trouble with PHP Include

Anthony Baratta anthony at baratta.com
Fri Feb 14 22:07:57 CST 2014

On 2/14/2014 7:59 PM, Santilal Parbhu wrote:
> 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:
> <snip>
> 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.


|include dirname(__FILE__)  .  "/includes/styles.php";|


|// PHP >= 5.3
include_once __DIR__.  '/../classes/authorizationUtils.php';

// PHP < 5.3
include_once dirname(__FILE__)  .  '/../classes/authorizationUtils.php';|

Anthony Baratta

"I used to think the brain was the most
  important part of my body, until I realized
  what was telling me that." - Emo Phillips

More information about the thelist mailing list