The error you get does not have to do with that note,
but rather that code of yours has many other issues 
such as:

  a) The syntax is incorrect

    print "a b " c " d";   // bad
    print "a b \" c \" d"; // good
    print "a b ' c ' d";   // good
    print 'a b " c " d';   // good
    ...
    http://www.php.net/types.string

  b) You are attempting to mix SSI into PHP

    You can't do that, just like how one can't
    write PERL or ASP code in PHP.

Some options:

  a) Using virtual()
 
    virtual("../cgi-bin/include/horoscopes.cgi");

  b) Go through HTTP

    $url = 'http://www.example.com/foo/horoscopes.cgi';
    echo implode('', file($url));

  c) Rewrite horoscopes.cgi as PHP

    This is the ideal option, consider doing this
    in the future.

That manual note you referred to has to do with code
such as (http == remote file):

  include 'http://www.example.com/foo.php';

Which would include the output of that url into the
webpage.  This is unrelated and remember that parse errors
are always due to syntax problems.

Regards,
Philip Olson


On Wed, 11 Dec 2002, Richard Creech wrote:

> 
> Hello List,
> Is there a way to execute a cgi inside of php? This is what a customer wants to do:
> 
> 
> include("<!--#exec cgi="../cgi-bin/include/horoscopes.cgi" -->");
> 
> but get an error message:
> 
> Parse error: parse error, unexpected '.' in 
>D:\Inetpub\townforum\wwwroot\orgs\header.php on line 3
> 
> 
> The manual says it won't work:
> http://www.php.net/manual/en/function.include.php
> "Warning 
> Windows versions of PHP prior to PHP 4.3 do not support accessing remote files via 
>this function, even if allow_url_fopen is enabled." 
> 
> The mail archives didn't shed any light on this question.
> 
> 
> What alternatives might work?
> 
> 
> Regards,
> 
> Richard Creech
> [EMAIL PROTECTED]
> 250.744.3350 Pacific Time
> Free and retail php resources for developers
> http://www.dreamriver.com
> 
> 
> 
> 
> 
> 
> 
> 
> 
> -- 
> PHP General 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

Reply via email to