473,813 Members | 3,307 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.includ e]: 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(realpat h('../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::__const ruct();

$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 1085
On Nov 7, 2:53 pm, Philluminati <Phillip.Ross.T ay...@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.includ e]: 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(realpat h('../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::__const ruct();

$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
2103
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 to use example1.com? i have tried to adjust the vhost section acording to the guide in the apache web page, but when i try i get error 404. also when i try http://localhost i also get 404. i've attached my .conf file. i want to access my server...
0
1646
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.. -- N0 Spam Ema|l address. Please, when replying directly, delete "NSPAMO" from email address. Thanks
3
1764
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 get it up and running. I then run winmysqladmin V1.4 (the mysql service is running) When I go to databases inside the admin, it shows on the left side the name of the server and IP address and it has a 'test' database listed below it..... From...
3
1834
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 construct a checkbox array in a survey form where one of the choices is "No Preference" which is checked by default. If the victim chooses other than "No Preference", I'd like to uncheck
6
1685
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 another value. I want to use this returned value to sort the lists. So, my resultant list would be ordered by the return value of the
24
2382
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 message "down" If the numbers are equal, print the message "equal" If there is an error reading the data, print a message containing the word "Error" and perform exit( 0 ); And this is what I wrote:
2
1327
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 LinkButton1_Click(object sender, System.EventArgs e) { if(flag==0) { Panel1.Visible=true; Panel1.Enabled=true;
2
14850
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 can get the new toplevel window to open but none of the widgets appear. The console gives me: AttributeError: 'NewWindow' object has no attribute 'tk' Here's my code:
3
1226
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); int calculateCharge(int daysHire, int seasonCharge);// my two function prototypes int main() {
0
9609
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10669
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10408
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10141
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7686
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6897
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5707
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4358
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3030
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.