Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Weird PHP error with include() ;/

Status
Not open for further replies.

youradds

Programmer
Jun 27, 2001
817
GB
Hi,

I'm trying to just include a basic .txt file, into a PHP script, with:

<?
include("/home/cbeach1/data/_tmpl/public/Footer.txt");
?>

Can anyone see why this would give the following error:

Parse error: parse error, unexpected '<' in /home/cbeach1/public_html/photogallery/index.php on line 50

(line 50 is ths new line I've added)

TIA

Andy
 
Hi,

Sorry, please ignore. I was trying to put this into a PHP gallery (someone elses). For some reason, they havn't closed the tags with ?> - so when I was adding in my own include() below that area, it wasn't liking it - cos the format was something like:

<?

<? include() ?>

(which you wouldn't expect to work :p)

Anyways - I added the ?> where it was mean't to be - and now it all works fine :)

Cheers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top