Can here help me on this ? Please give me more attention than Stig. this give me no result - php with -C option - c:\php\php.exe -f gen.hp - useong function passthru() vagy popen().
So please, before you suggest soemthing please try it. thanx Otto > ----- Original Message ----- > From: "Stig S. Bakken" <[EMAIL PROTECTED]> > To: "otto" <[EMAIL PROTECTED]> > Cc: <[EMAIL PROTECTED]> > Sent: Thursday, April 18, 2002 8:59 PM > Subject: Re: [PHP-DEV] HTML generate from PHP code > > > > 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, so it's not the OP. system("a.bat"); /* content of a.bat: */ // c:\php\php.exe -q <gen.php >index.htm // /usr/local/sbin/php -q <gen.php >index.htm /*another try */ system("/php/php.exe < ".$DOCUMENT_ROOT.$PATH_INFO."index.html "); Header("Location:index.html"); exit; } echo '<a href="gen.php?generate">Generate</a>'; 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 > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php