See this Screenshot http://prntscr.com/fmcnp7
If my PHP Code have any bug, like missing semicolon, then i get this error. Instead of this, i am supposed to get a error line by PHP right? What's wrong?
See this Screenshot http://prntscr.com/fmcnp7
If my PHP Code have any bug, like missing semicolon, then i get this error. Instead of this, i am supposed to get a error line by PHP right? What's wrong?
HTTP ERROR 500 can be spotted as error when you miss something in PHP Code but not semi colon.If you miss semi-colon from PHP, the page won't display anything. The better way is to share your code and then we can take a look on it.
first of all your question is incomplete but that's not your problem.. you are learning we are all human.
You can check where the error is coming from in two different ways.
the first and inconvenient one is opening the logs file which is in your root directory of your website and search for the latest time-stamp and read through where your error is coming from.
The other is is to include these lines of code on top of your index webpage
ini_set("display_errors",1);
ini_set("display_startup_errors",1);
error_reporting(E_ALL);
?>then you are set.
For me i wrap this code inside a class with static method
// errors.php
<?php
class errorReporting{
public static function displayerrors($switch){
if($switch == "on"){
ini_set("display_errors",1);
ini_set("display_startup_errors",1);
error_reporting(E_ALL);
}
return false;
}
}
?>
//index.php
<?php
include_once "errors.php";
errorReporting::displayerror("on");
?>