note 11194 deleted from function.include by jimw
| From: | jimw@php.net | Date: | Mon, 17 Dec 2001 22:58:43 +0000 |
| Subject: | note 11194 deleted from function.include by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-23056@lists.php.net to get a copy of this message | ||
I tried to achieve the functionality of "include_once" in PHP 3.0.15 with code like the
following.
if (defined('_Lib_included'))
{
// Stop inclusion of this file
return '';
}
else
{
define('_Lib_included', 1);
}
It works so that multiple inclusions are avoided. But an unexpexted "Parse error" is
reported on the last line of the main script that was executed successfully till there even if the
"library file" was included multiple times.