I am following Object oriented programming tutorial.... I did exact same as tutorial but it doesn't work for me at Url class in getPage() function and it does not show any error.
... As tutorial it will come with error.php which is in pages folder, if I don't have any page created at pages folder or that page should come that will I create at pages folder
public static function getPage() {
$page = self::$_folder.DS.self::cPage().".php";
$error = self::$_folder.DS."error.php";
return is_file($page) ? $page : $error;
}
Here is my code... Have any suggestion... Thanks in advance.
To run PHP, you need to start a server.
There are many ways to do this. One popular solution is to install mamp which has a free version.
Once you have mamp installed there will be a default htdocs directory. You can change this to where your php code is by going to preferences web server and changing document root:
To see if any php errors have occured, you'll need to go to the logs which can be located: /Applications/MAMP/logs/php_error.log
Note: This is OS X