Posted by Philluminati on 11/07/07 15:12
On Nov 7, 2:53 pm, Philluminati <Phillip.Ross.Tay...@gmail.com> wrote:
> I'm new to PHP and I'm having problems trying to get this include
> statement to work. Can anyone help me?
>
> This is the error I get:
>
> Warning: include() [function.include]: Failed opening '' for inclusion
> (include_path='.:/php/includes') in /home/ptaylor/public_html/am_web/
> model/classes/customer.php on line 3
>
> This is the contents of the customer.php file:
>
> <?php
>
> include(realpath('../interfaces/tableobject.php')); #<---
> THIS IS LINE 3, WHERE THE ERR IS REPORTED
>
> class Customer implements TableObject
> {
> public $Id;
> public $Name;
> public $Comments;
> public $Deleted;
>
> public $Children; #Children are Regions
> public $Rights;
>
> #Customer Constructor.
> public function __construct($id)
> {
>
> parent::__construct();
>
> $this->Id = $id;
> }
>
> public function GetTableName()
> {
> return "customer";
> }
>
> public function GetTableId()
> {
> return $this->Id;
> }
>
> public function GetChildren()
> {
> return $this->Children;
> }
>
> public function GetRights()
> {
> return $this->Rights;
> }
>
> public function GetTreeText()
> {
> return $this->Name;
> }
>
> }
>
> ?>
>
> The file is DEFINETELY 100% in that location. If I do cd ../
> interfaces/ there is a file there called tableobject.php
>
> the contents of that file is this:
>
> <?php
>
> #Represents an object that lives in the database.
>
> public interface TableObject
> {
> function GetTableName();
> function GetTableId();
> function GetChildren();
> function GetRights();
>
> }
>
> ?>
>
> Can anyone help? Is the include statement in the wrong place?
>
> Phill
Don't worry fixed it :-)
[Back to original message]
|