I have these two php files in the same directory:
index.php
<?php
echo "before";
require('Parser.php');
echo "after";
?>
Parser.php
<?php
/**
* Class Parser
*/
class Parser
{
private $url;
function __construct($url)
{
$this->url = $url;
}
public function getUrl(){
return $this->url;
}
public functionsetUrl($url){
$this->url = $url;
}
}
?>
I need to import the Parser file because i have to use this class in my index file but i can't.
There is a problem importing this class because if i try to access index.php i can see only the first print: before.
I don't know where is the problem but is very strange, my files are so simple.
My php version is 5.6 and i'm using MAMP as web server.
Can someone help me? Thanks
Fatal Error