PC Nerd Posted July 6, 2006 Share Posted July 6, 2006 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 helpthanksPC Nerd Quote Link to comment Share on other sites More sharing options...
GingerRobot Posted July 6, 2006 Share Posted July 6, 2006 You will need to show the code here.Also, make sure the file to be included has been started and finished with php tags. Quote Link to comment Share on other sites More sharing options...
PC Nerd Posted July 6, 2006 Author Share Posted July 6, 2006 why does the file need to have php tags isnt it inside other php tags once it is included???ill post the code next Quote Link to comment Share on other sites More sharing options...
PC Nerd Posted July 6, 2006 Author Share Posted July 6, 2006 [code]include("inc files/Database link.inc.php");[/code] Quote Link to comment Share on other sites More sharing options...
GingerRobot Posted July 6, 2006 Share Posted July 6, 2006 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] Quote Link to comment Share on other sites More sharing options...
PC Nerd Posted July 7, 2006 Author Share Posted July 7, 2006 ok, thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.