Page 1 of 1

Stupid Noob Can't Make Computer Work

Posted: Tue Nov 03, 2009 11:26 pm
by Jobeesh
I'm working on a database application in PHP, it is my first. I'm just testing out some of my server side logic with an html form to input data but I'm having problems. I think there is a syntax error in one of my files but, for some reason, nothing is being output to my browser. I know which file causes the issue because echos before the point where the require_once is run will work but if I echo after nothing happens. I commented out my requires and ran the code and it works as expected (which isn't very much but it still works). I also intentionally put a syntax error into my main file with the other two requires commented out and still no output to my browser about the error. If anybody could help me I'd greatly appreciate it.

Re: Stupid Noob Can't Make Computer Work

Posted: Wed Nov 04, 2009 12:05 am
by mischievous
try putting this at the top of your php file... this should show you what errors are happening.

Code: Select all

 
ini_set('display_errors', 1);
ini_set('log_errors', 1);
ini_set('error_log', dirname(__FILE__) . '/error_log.txt');
error_reporting(E_ALL);
 
Also, try using

Code: Select all

include_once('file.php');

Re: Stupid Noob Can't Make Computer Work

Posted: Wed Nov 04, 2009 8:59 am
by Jobeesh
Thanks for the help, I can now see all of the mistakes I made.