Simple include( ) help;

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
suz_1234
Forum Newbie
Posts: 24
Joined: Sat Sep 04, 2004 11:22 pm

Simple include( ) help;

Post by suz_1234 »

Hi...

I have a book.php page under 'web' folder and Pager.php under 'src' folder. I am trying to use Pager.php in book.php

My code looks like this:

Code: Select all

include("src/Pager.php");
$p = new Pager;
But I am getting an error
"Cannot instantiate non-existent class: pager in /homepages/20/d104789058/htdocs/web/book.php "

Can someone please try to help me..

Thank you,
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Code: Select all

include('../src/Pager.php')
although I'd suggest setting your include path...
Post Reply