SukhmeetSingh Posted February 14, 2008 Share Posted February 14, 2008 Hi friends,I am new to PHP and am including a file and this file is not generating any result in the file where it is being included. A copy of this file is lying on web server with exactly same code and same file that is included and is working there. Can somebody suggest where the problem is. I am using WAMPP. Link to comment Share on other sites More sharing options...
justsomeguy Posted February 14, 2008 Share Posted February 14, 2008 How are you including the file? If you are including it using HTTP that will be an issue. Link to comment Share on other sites More sharing options...
SukhmeetSingh Posted February 15, 2008 Author Share Posted February 15, 2008 How are you including the file? If you are including it using HTTP that will be an issue.I am including the file without http i.einclude("filename.php"); Link to comment Share on other sites More sharing options...
real_illusions Posted February 15, 2008 Share Posted February 15, 2008 Have you wrapped the line in php open/end tags?like this -<?phpinclude("filename.php");?>Also..have you enabled php wamp? Does the page have a .php ending? Check you have the file in the same directory or the paths are correct between page and include. Link to comment Share on other sites More sharing options...
SukhmeetSingh Posted February 15, 2008 Author Share Posted February 15, 2008 Have you wrapped the line in php open/end tags?like this -<?phpinclude("filename.php");?>Also..have you enabled php wamp? Does the page have a .php ending? Check you have the file in the same directory or the paths are correct between page and include.Yes, i have php tag and the strange thing is tht when i include some other file that contains eg. a simple print (echo) command, it works but not this specific file and this file is working on web server where it is published. I just formated system and installed windows and xampp and it did'nt work from tht moment. Link to comment Share on other sites More sharing options...
real_illusions Posted February 15, 2008 Share Posted February 15, 2008 It sounds like its something in the file your including?What is it you have inside the include file? If its server specific stuff, then that would explain it..like connecting to database etc.. Link to comment Share on other sites More sharing options...
justsomeguy Posted February 18, 2008 Share Posted February 18, 2008 Make sure error messages are enabled before you include the file. Also check inside the include file and make sure that error messages are not being disabled in the include file.ini_set("display_errors", 1);error_reporting(E_ALL); Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.