HTML generate from PHP code

From: Date: Wed, 17 Apr 2002 22:56:53 +0000
Subject: HTML generate from PHP code
Groups: php.dev 
Request: Send a blank email to php-dev+get-82973@lists.php.net to get a copy of this message
Hi I have some problem when I try to generate HTML file from PHP. I have a "gen.php" and inside ------------------------------------------------------------------- <? if (@$QUERY_STRING=="generate"){ // I try on Linux and Win also system("a.bat"); // content of a.bat: // c:\php\php.exe -q <gen.php >index.htm //another try system("/php/php.exe < ".$DOCUMENT_ROOT.$PATH_INFO." >index.html "); // Header("Location:index.html"); exit; } echo "hello world." ?> when I run the "a.bat" from command line it's ok. I get index.html with content "hello world." But when I try direct from PHP /in browser url "gen.php?generate" / calling system("a.bat") I get this in index.html: ------------------------------------ X-Powered-By: PHP/4.1.1 Content-type: text/html ------------------------------------ any idea why is that, or workaround solution ? thanks otto

« previous php.dev (#82973) next »