Mailinglisten-Archive |
Hi, On Wednesday 02 February 2005 10:53, Michael Borchers wrote: > >-----Ursprüngliche Nachricht----- > >Von: Michael Borchers > >Gesendet: Mittwoch, 2. Februar 2005 09:20 > >An: php (E-Mail) > >Betreff: [php] php5 Hm, das ist deutsch... > >uhh, > >just updated our server to php5 > >and right from the start a lot of the functionson my phorum stopped > > working because they were supposed to be declared before f.e. das ist English > >Fatal error: Cannot redeclare undo_htmlspecialchars() (previously declared > > in /home/httpd/docs/.../common.php:90) in /home/httpd/docs/.../common.php > > on line 98 das ist Englisch von PHP > >is that one typical php5 probs, functions though they were definitely NOT > > declared before seem to get lost? > > has it got to do with this? wieder Englisch... > // > If there are functions defined in the included file, they can be used in > the main file independent if they are before return() <function.return.php> > or after. If the file is included twice, PHP 5 issues fatal error because > functions were already declared, while PHP 4 doesn't complain about it. It > is recommended to use include_once() <function.include-once.php> instead of > checking if the file was already included and conditionally return inside > the included file. include_once() <function.include-once.php> and > require_once() <function.require-once.php> first normalize the path of > included file on Windows so that including A.php and a.php include the file > just once. > > http://www.php.net/manual/en/migration5.incompatible.php > // > Zitat aus dem englischen Handbuch > should include no longer be used, just include_once? wieder englisch. Nur zur Erinnerung: Dies ist bisher eine deutsche Liste. Aber zum Thema: ja, include_once bzw. require_once ist Dein Freund. johannes
php::bar PHP Wiki - Listenarchive