473,326 Members | 2,196 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Problem with Include (newb question)

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

Nov 7 '07 #1
1 1070
On Nov 7, 2:53 pm, Philluminati <Phillip.Ross.Tay...@gmail.comwrote:
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 :-)

Nov 7 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: TrashOverride | last post by:
Hello guys i have a question about apache... i have installed Apache 2.0.54 PHP 5 MySQL 4.01 and i was wondering if i could use a name to access my apache server -> not to use http://localhost but...
0
by: David E. | last post by:
So as a programmer, what's the best thing to study? EJB? How much of the J2EE or Enterprise architecture is necessary to no? I guess I need a good overview for a newb like me... thanks.. --...
3
by: Walter | last post by:
But I'm stumped..... I've got a windows 2000 server and I am trying to set up PHPBB on it using a mysql database.. I am very inexperienced on this..... Ive installed mysql V4.0.20d and I can...
3
by: claudel | last post by:
Hi I have a newb PHP/Javascript question regarding checkbox processing I'm not sure which area it falls into so I crossposted to comp.lang.php and comp.lang.javascript. I'm trying to...
6
by: Sean Berry | last post by:
Hello all I have build a list that contains data in the form below -- simplified for question -- myList = ,, ...] I have a function which takes value3 from the lists above and returns...
24
by: Apotheosis | last post by:
The problem professor gave us is: Write a program which reads two integer values. If the first is less than the second, print the message "up". If the second is less than the first, print the...
2
by: Blue Man | last post by:
Hello I want to create a link that open and close a panel. but i can't save a variable as a flag to test each time if the panel is open or not, this is my code : int flag=0; private void...
2
by: python programming newb | last post by:
Hi all, first post. I'm new to python and tkinter. I'm trying to write a program that opens the root window with a button that then opens a toplevel window that then has it's own widgets. I...
3
by: zylo | last post by:
hello ive just started learning c++ and im really stuck. the program doesnt seem to beable to read the if statement properly # include <iostream> using namespace std; int getDaysHire(int);...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.