include_once("blah"); vs $blah="blah"; include($blah);
| From: | Henry | Date: | Tue, 11 Jun 2002 12:14:59 +0000 |
| Subject: | include_once("blah"); vs $blah="blah"; include($blah); | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-101532@lists.php.net to get a copy of this message | ||
My web hosting company is running php 4.0.4pl1
Why should it be that these are different
<?php
global $root;
include_once("include\blah.php");
?>
and
<?php
global $root;
$blah="include\blah.php";
include_once($blah);
?>
When I say different I mean;
1) global variable are not avaiable in the second version
2) functions defined in the included file are not accessable in the
including file.
3) in both examples the file is included, its just the scope that seem shot
Any answers?
Henry