note 52342 deleted from function.include by peehaa

From: Date: Fri, 09 Dec 2016 22:54:32 +0000
Subject: note 52342 deleted from function.include by peehaa
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-208397@lists.php.net to get a copy of this message
Note Submitter: morris.php <A T> it-solutions.org ---- 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: <?php include "http://example.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.

« previous php.notes (#208397) next »