note 52342 added to function.include
| From: | morris.php" it-solutions . org | Date: | Thu, 28 Apr 2005 12:31:13 +0000 |
| Subject: | note 52342 added to function.include | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-88684@lists.php.net to get a copy of this message | ||
Something not previously stated here - but found elsewhere - is that if a file is included using a
URL and it has a '.php' extension - the file is parsed by php - not just included as it
would be if it were linked to locally.
This means the functions and (more importantly) classes included will NOT work.
for example:
include "http://MyServer.com/MyInclude.php";
would not give you access to any classes or functions within the MyInclude.php file.
to get access to the functions or classes you need to include the file with a different extension -
such as '.inc' This way the php interpreter will not 'get in the way' and the
text will be included normally.
----
Manual Page -- http://www.php.net/manual/en/function.include.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+52342
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+52342&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+52342&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+52342&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+52342&report=yes&reason=useless
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+52342&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+52342&report=yes
Search -- http://master.php.net/manage/user-notes.php