sono...@fannullone.us wrote:
>     I've searched high and low for an answer to this.  Hopefully someone
> here might know.  Can PHP be used under a CGI?  I tried to put the
> following code on one of my perl shopping cart pages but it doesn't work:
> 
> <?php
> echo "<select name=\"Year\">";
> for ($year = date("Y") ; $year <= date("Y") + 8 ; $year++) {
>     echo "<option value=\"$year\">$year</option>\n";
> }
> echo "</select>";
> ?>
> 
>      It works fine on a .php page.  I know that SSI will not work under
> CGI, so maybe it's the same for PHP.  Is there anyway to get this to work?
> 
> Thanks,
> Frank

PHP can run under CGI, however you're asking about mixing PHP with Perl.
 CGI != Perl.  CGI is the interface that your scripts have to the
programs that run them (i.e. Perl or PHP, etc...).

I've never done it, but to have both Perl and PHP parsed in one file,
you'd have to configure Apache (or your webserver) to parse the file
using PHP and then Perl.  Not sure if it would do this sequencially though.

Another option may be to put the PHP in its own PHP file and then fetch
it into your Perl script.

-- 
Thanks!
-Shawn
http://www.spidean.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to