Two quick questions about PHP Includes...
As we know...
<?php include ('/events/popup.php'); ?>
...will not work, because PHP believes the root folder to be the actual root of the hard drive the site is stored on (ie, /home/user/html/etc).
However, someone passed along the following suggestion which SEEMS to work just fine :
<?php include $_SERVER["DOCUMENT_ROOT"].('/events/popup.php'); ?>
I'm guessing our server administrator has the document root -- aka, the root folder of this specific website -- specified in a config file somewhere that we are accessing via this command. Is that correct?
That is question #1.
Question #2 has to do with syntax. Is the proper include syntax :
<?php require ('popup.php'); ?>
or
<?php require ("popup.php"); ?>
or
<?php require "popup.php"; ?>
