|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[1998-04-29 09:34 UTC] zeev
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 12:00:01 2025 UTC |
I think this is a bug - if it is supposed to be this way, I sure don't see the why?!? In PHP3 you're supposed to use ":" instead of ";" between the different statements in a if-elseif-else-endif loop. This doesn't seem to be the case when writing to a file with the "fputs" command?!?!? This e.x. will not work: <?$fd = popen("/usr/sbin/sendmail -t","w"); fputs($fd, "to: someone@somewhere.com\n"); fputs($fd, "from: someone@somewhere.com\n"); fputs($fd, "subject: header\n\n"); fputs($fd, "\n\n"); $a=1; if($a=1): fputs($fd, "line1\n"): fputs($fd, "line2\n"); endif; pclose($fd)?> To make it work I had to use ";" instead of ":" in the first fputs line - like this: fputs($fd, "line1\n"); otherwise it will not work??? Try out this url - where I have an example running and see the parse error message it produces: http://wizards.dk/hotel/mf/shop/test.phtml Best Regards Keld Vraakjaer