Re: Having PHP inside of ASP using the #include VIRUTAL= directive??
| From: | elias | Date: | Mon, 30 Jul 2001 14:14:25 +0000 |
| Subject: | Re: Having PHP inside of ASP using the #include VIRUTAL= directive?? | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-8565@lists.php.net to get a copy of this message | ||
> I'm not sure about calling a PHP page from an ASP page, but I have called
a PERL-based cgi from a php using the php include function. The only thing I
had to do was include the file using a full url instead of just the relative
filename.
>
> Example:
>
> <?
> include("http://myserver.com/cgi-bin/includeme.cgi") ?>
> //CORRECT
Yes, true....
This works fine wish ASP as well. But you don't really have the same result
as:
include ("file.cgi");
i mean with this include you would have something like:
You coded:
<?
$a = 1;
$b = 2;
include(http://server.com/file.cgi)
$c = 3;
?>
PHP translated it to:
<?
$a = 1;
$b = 2;
?>
echo the result returned by http://server.com/file.cgi
(which is usualy an
HTML output)
<?
$c = 3;
?>
but you can also use the $fp = fopen(http://server.com/file.cgi); $content =
fread($fp, 10000000); fclose($fp);
now you can manipulate $content as you want.
//elias
"Randy Wilcox" <Randy.Wilcox@sas.com> wrote in message
news:4F2457EC921ED31188C20090276DC8C405A9A7DB@merc02.na.sas.com...
> I'm not sure about calling a PHP page from an ASP page, but I have called
a PERL-based cgi from a php using the php include function. The only thing I
had to do was include the file using a full url instead of just the relative
filename.
>
> Example:
>
> <?
> include("http://myserver.com/cgi-bin/includeme.cgi") ?>
> //CORRECT
>
> <? include("cgi-bin/includeme.cgi") ?> //WRONG
>
> In the wrong version, the contents of the CGI would be included rather
than the output.
>
> More info:
> http://www.php.net/manual/en/function.include.php
> http://www.php.net/manual/en/features.remote-files.php
>
>
>
>
> -----Original Message-----
> From: Kevin Costain [mailto:admin@kevincostain.com]
> Sent: Sunday, July 29, 2001 12:16 AM
> To: php-windows@lists.php.net
> Subject: [PHP-WIN] Having PHP inside of ASP using the #include VIRUTAL=
> directive??
>
>
> Hello,
>
> I was wondering if anyone had done this before, i would like to add a
> counter to a page that is asp and use the asp directive #include VIRUTAL=
> to include say, count.php and treat this as php script. Has anyone tried
> this? Is there a way to run PHP from within ASP itself ?
>
> Thanks,
> Kevin Costain
>
>
>
> ===============================
> KCTS: http://www.kevincostain.com
> 416-463-6655
> ===============================
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net
> For additional commands, e-mail: php-windows-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net