Fw: HTML generate from PHP code
| From: | otto | Date: | Wed, 24 Apr 2002 17:00:06 +0000 |
| Subject: | Fw: HTML generate from PHP code | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-94403@lists.php.net to get a copy of this message | ||
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" <ssb@fast.no>
> To: "otto" <otto@webline.ch>
> Cc: <php-dev@lists.php.net>
> 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
> > php-general@lists.php.net ;-)
> >
> > - Stig
> >
> >
> > --
> > PHP Development Mailing List <http://www.php.net/>
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>