I seem to have a hitch on my get along when working with "namespaces". I am working on a personal web site and would like to try the "namespace" feature; however, I can't get it to work. I tried modifying the "include_path" by adding ".:/home/myname/com". This is what my files look like:
"/home/myname/com/page/BasicPage.php"
Code: Select all
<?php
namespace "page";
class BasicPage {
private $_pageTitle;
public function __construct($pageTitle){
$this -> _pageTitle = $pageTitle;
}
// rest of the class code...
}
?>
Code: Select all
<?php
include "page";
$page = new page::BasicPage("Page Title");
// rest of the objects...
?>