[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [cobalt-users] PHP include() error...RAQ3 problem?
- Subject: RE: [cobalt-users] PHP include() error...RAQ3 problem?
- From: "Cobalt" <cobalt@xxxxxxxxxxxx>
- Date: Sun Aug 27 22:19:18 2000
>I take it line 16 is the line with the include() statement? It looks
>properly formatted. Read the first paragraph on
>http://www.php.net/manual/function.include.php. It may apply to you,
>though I'm not familiar with the configuration option mentioned. Also,
>make sure you aren't missing a ";" or "}" or something similiar on a line
>before the include() statement.
>
>> The line that is receiving the parse error is the line after the </html>
>> tag. It does not look to be a programming error but some kind of
>> configuration error. I have been going back and forth on the PHP mailing
>> list and it looks like my syntax and programming is correct.
>
>Scott, have you done any testing to ensure that you can include a file
>using a URL? Create a PHP script that only has an include() statement and
>include a URL that just has something like "<b>Bold text</b>" in it. If
>it doesn't work then you probably are just unable to include a file using
>a URL. I just tested on a RaQ2 running PHP4.0.1pl2 and I'm able to
>include a file using a URL. I never tried using PHP3. As an alternative
>you can use fopen() and fgets() to achieve the same thing as include().
O.K. so it turned out to by a syntax/programming error...After a day of
playing with it...going back and forth with people on the PHP lists...trying
everything under the sun...I figured it out.
If anyone cares...here is the problem:
I was using
<?
include("/home/sites/site#/file.html");
?>
Code looks correct?..right...wrong. It turns out that you either have to
either use single quotes:
include('/home/sites/site#/file.html');
or not parenthases:
include "/home/sites/site#/file.html";
Many great appoligies for any time wasted on this one. But with every
problem....there is opportunity for knowledge. And I can safely say that I
will NEVER forget how to do an include() statement in PGP.
Sorry again for what turned out to be an "off topic" post.
Scott