|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2005-11-09 21:50 UTC] subscription at nazarenko dot net
Description: ------------ According to this page: http://www.php.net/manual/en/function.main.php the misbehaviour was stopped in PHP 4.3.2, however it is still present in the latest 5.1.x snapshot. In addition when require_once() or include_once() call fails and "html_errors" is "On" the error message HTML link points to the same function "require()" or "include()", without the _once() part in it. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 21:00:01 2025 UTC |
A sample script: <?php require_once('nonexisting'); ?> Produces this HTML (html_errors=on): <b>Warning</b>: main(fake) [<a href='http://www.php.net/manual/en/function.main.php'>function.main.php</a>]: failed to open stream: No such file or directory in <b>x.php</b> on line <b>2</b><br /> </span> <b>Fatal error</b>: main() [<a href='http://www.php.net/manual/en/function.require.php'>function.require.php</a>]: Failed opening required 'fake' (include_path='.:/usr/lib/php') in <b>x.php</b> on line <b>2</b><br /> This illustrates both points: the erroneous main() function as well as the wrong html link (should be funtion.require-once.php)Sorry, the script above should have require_once('fake');