On Thu, 2002-04-18 at 00:56, otto wrote:
> 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 ?

Add "-q" after "php.exe".  And next time send questions like this to
[EMAIL PROTECTED] ;-)

 - Stig


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to