PHP 4.0 Bug #8257 Updated: Functions defined in the auto-appended file cannot be called from original file
| From: | hholzgra@php.net | Date: | Thu, 14 Dec 2000 15:00:11 +0000 |
| Subject: | PHP 4.0 Bug #8257 Updated: Functions defined in the auto-appended file cannot be called from original file | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-41374@lists.php.net to get a copy of this message | ||
ID: 8257
Updated by: hholzgra
Reported By: dron007@yahoo.com
Old-Status: Open
Status: Closed
Bug Type: Scripting Engine problem
Assigned To:
Comments:
the append file is parsed after your script is done,
what you are looking for is most likely auto_prepend,
not auto_append
Previous Comments:
---------------------------------------------------------------------------
[2000-12-14 08:11:59] dron007@yahoo.com
In php.ini file:
auto_append_file =/usr/local/apache/htdocs/www/after.phtml
File test.phtml:
<?
test();
?>
File after.phtml:
<?
echo "after.phtml start<br>";
function test()
{
echo "test";
}
echo "after.phtml end<br>";
?>
When I run file test.phtml I see the message:
"Fatal error: Call to undefined function: test() in /usr/local/apache3/htdocs/www/oc/test.phtml
on line 2"
After removing the call of test() function in test.phtml everything works OK. It shows:
after.phtml start
after.phtml end
---------------------------------------------------------------------------
Full Bug description available at: http://bugs.php.net/?id=8257