note 36913 added to function.main
| From: | Tricrokra at rn2 dot php dot net | Date: | Mon, 27 Oct 2003 09:39:39 +0000 |
| Subject: | note 36913 added to function.main | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-59360@lists.php.net to get a copy of this message | ||
The referrence to function main, appears only to me when I made an error in the files php looks for
in with the "require" command (include will do the same)...
The function "main" appears to me that it's there as a leftover of the fact that php
is a cousin to C and C++ and that php sees everything that's not in a function falls under
function "main" as "main" is in C used as the function that's automaticly
executed when your C application starts...
But if the "require" function cannot find the file files you give up with
"require" or "include", I suppose php cannot form for itself the function main
and thus gives this error...
I hope this technobabble is understandable...
In any way, it only occurred to me when I made typos in the filename in my "require"
commands, and this php cannot find the required file... Pretty logical the compiler or whatever does
not function then... But the errormessage is indeed pretty confusing....
----
Manual Page -- http://www.php.net/manual/en/function.main.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+36913
Delete -- http://master.php.net/manage/user-notes.php?action=delete+36913&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+36913&report=yes
Search -- http://master.php.net/manage/user-notes.php