[PHP-DEV] PHP 4.0 Bug #8257: Functions defined in the auto-appended file cannot be called from original file From: dron007 <email protected>
Date: 12/14/00

From: dron007 <email protected>
Operating system: Red Hat 5.2 (kernel 2.2.17)
PHP version: 4.0.3pl1
PHP Bug Type: Scripting Engine problem
Bug description: Functions defined in the auto-appended file cannot be called from original file

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

-- 
Edit Bug report at: http://bugs.php.net/?id=8257&edit=1

-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>