ID:               41855
 Updated by:       [EMAIL PROTECTED]
-Summary:          Problem with require function
 Reported By:      siegler at boskage dot com
-Status:           Open
+Status:           Bogus
-Bug Type:         Filesystem function related
+Bug Type:         Scripting Engine problem
 Operating System: Windows Server 2003 (IIS 6)
 PHP Version:      5.2.3
 New Comment:

FYI: require / include are not functions, they are language
constructs.
And something like 'require() or foo()' isn't gonna work since require
exits if file is not found.


Previous Comments:
------------------------------------------------------------------------

[2007-06-29 18:32:22] siegler at boskage dot com

Description:
------------
I am having problems using a require statement and getting very odd
results.  The link of code is: 

require("util.php");

util.php does exist in the same directory as the executing script (I
have even run getcwd() to insure my path is getting interpreted
correctly).  

Initially I was getting no error output from this, and for some reason
when I change the code to read:

require("util.php") or die("blah");

I will get my error, except require is throwing a notice instead of a
fatal error so I need this die statement to actually get an error to
show, and die never shows the text I pass to the function.

Reproduce code:
---------------
Any require statement may or may not reproduce this issue (for the most
part it seems pretty random).  I can temporarily fix this by switching
my require to an include, run the script, switch back to require and
rerun the script.  It will work then for a short period of time.



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=41855&edit=1

Reply via email to