|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2000-07-18 10:53 UTC] hholzgra at cvs dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Dec 20 02:00:02 2025 UTC |
Using something like xxtest.php3 it does not seem to recognize/acknowledge the constant definitons, the return value of define shows ok but when the constant actually gets used it does not become translated, instead one gets the constant name (XXTOP). I tried infinite times without success, even restarted the web server. At some point, all of a sudden it started working. I implemented then something else following the same approach and then again the original was working but the 'cloned' one was not working. The same happened when trying to load the define'd constants from a file with include(). And in this case require() would not even work. --- xxpaths.php3 --- function xxPaths() { global $SERVER_NAME; if ($SERVER_NAME == "www.production.com") { $home = "/usr/home/someone"; $whome = "$home/www"; $top = $SERVER_NAME; } else { $home = "/home/someone"; $whome = "$home/public_html"; $top = "homehost.isp.com/~someone"; } define("XXTOP", "http://$top"); define("XXHOME", "$home"); define("XXWHOME', "$whome"); } ----- xxtest.php3 ------ include("xxpaths.php3"); xxPaths(); print( XXTOP . "/php3lib");