Stupid Noob Can't Make Computer Work

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Jobeesh
Forum Newbie
Posts: 2
Joined: Tue Nov 03, 2009 11:16 pm

Stupid Noob Can't Make Computer Work

Post 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.
mischievous
Forum Commoner
Posts: 71
Joined: Sun Apr 19, 2009 8:59 pm

Re: Stupid Noob Can't Make Computer Work

Post 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');
Jobeesh
Forum Newbie
Posts: 2
Joined: Tue Nov 03, 2009 11:16 pm

Re: Stupid Noob Can't Make Computer Work

Post by Jobeesh »

Thanks for the help, I can now see all of the mistakes I made.
Post Reply