| Home  |  | About  |  | Contact  |  | Board index » Web design and hosting » Developer discussion board 
Register  |   FAQ   |  Search  |  Login
Host : WEBHOSTINGPAD.COM
  • Free domain name
  • Unlimited Disk Space
  • Unlimited Bandwidth
  • Unlimited sub domain
  • Host unlimited domain
  • Unlimited MySql database
  • Unlimited Parked Domains
  • SSI (Server Side Includes)
  • Weekly Backups
  • And much more..
  • 1.99 USD per month

Visit : webhostingpad.com

Hosting: Free trial
FatCow is one of the leading webhost in the internet today. FatCow Web Hosting. Free Trial , Free Setup, Free Support, All risk free!
Visit: FatCow.com


Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: PHP include statement not working
PostPosted: Sat Feb 06, 2010 6:16 pm 
Offline

Joined: Thu Jan 15, 2009 11:46 am
Posts: 7
I write a small object oriented PHP script for my shopping chart. I verify each function individually. When I write codes in single file they are working fine. But when I isolate them in different files it shows error that undefined function. But that function is inside my functions.php file. Here is my code.
Code:
<?php
include items.php;
include functions.php;
include config.php;
$item= new items($itemID);
$cost=$item->cost();
……………
……………
?>


Top
 Profile E-mail  
 
 Post subject: Change the order of include statement
PostPosted: Sun Feb 07, 2010 6:59 am 
Offline
Site Admin

Joined: Wed Nov 05, 2008 8:04 am
Posts: 90
I'm not sure, but as you said codes are working when they are in single file, you can try by changing the order of include statements.
Code:
include config.php;
include functions.php;
include items.php;
I think it will work for you.


Top
 Profile E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
©  2008,   http://ramui.com   All rights reserved.
Powered by phpBB