PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.lang.php > Problem with Include (newb question)
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Problem with Include (newb question)

Réponse
 
LinkBack Outils de la discussion
Vieux 07/11/2007, 14h53   #1
Philluminati
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut 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 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 ? Is the include statement in the wrong place?

Phill

  Réponse avec citation
Vieux 07/11/2007, 15h12   #2
Philluminati
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Problem with Include (newb question)

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 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 ? Is the include statement in the wrong place?
>
> Phill


Don't worry fixed it :-)

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 13h10.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,10368 seconds with 10 queries