Jump to content

Archived

This topic is now archived and is closed to further replies.

PC Nerd

include error

Recommended Posts

im trying to include a file, but when it does so, it echos the entire contents of the inc file.  ive renamed the file .inc  .php  .inc.php  but nothing works.  can anyone help


thanks

PC Nerd

Share this post


Link to post
Share on other sites
You will need to show the code here.

Also, make sure the file to be included has been started and finished with php tags.

Share this post


Link to post
Share on other sites
why does the file need to have php tags  isnt it inside other php tags once it is included???

ill post the code next

Share this post


Link to post
Share on other sites
[code]include("inc files/Database link.inc.php");[/code]

Share this post


Link to post
Share on other sites
http://uk.php.net/include/

[quote]
When a file is included, parsing drops out of PHP mode and into HTML mode at the beginning of the target file, and resumes again at the end. For this reason, any code inside the target file which should be executed as PHP code must be enclosed within valid PHP start and end tags.
[/quote]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.