General Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old September 8th, 2002, 06:41 AM
wAr-AnGeL wAr-AnGeL is offline
Forum Security
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: Behind You
Posts: 479 wAr-AnGeL User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 m 50 sec
Reputation Power: 7
Send a message via ICQ to wAr-AnGeL Send a message via AIM to wAr-AnGeL
Exclamation Class does not exist?

Well, i have a file holding a class inside it. I include it into my main page and call it using:
PHP Code:
 $details = new UserDetails;
$UserResult $details->RetriveData

Then I get the following error message when I call it:
Quote:
Fatal error: Cannot instantiate non-existent class: userdetails in /home/gotlag/public_html/globals/menu.php on line 101

The php code defining the class can be found here. here

I have spent hours looking at this code to no avail. Please help!
__________________




"Only Linux users see the end of crashes."
- Pl4t0

Reply With Quote
  #2  
Old September 8th, 2002, 11:26 AM
roy roy is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2002
Location: Malaysia
Posts: 21 roy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Hello,
It works on my PC. Are you sure you have included the class file correctly?

Reply With Quote
  #3  
Old September 8th, 2002, 12:50 PM
FrankieShakes FrankieShakes is offline
Frank The Tank!
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: Jun 2002
Location: Toronto, Canada
Posts: 1,246 FrankieShakes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Send a message via ICQ to FrankieShakes Send a message via MSN to FrankieShakes
Make sure you use the same case "UserDetails" when including the class... Also, be sure you saved the file as "UserDetails" and not "userdetails" or "userDetails".
__________________
____________________________________________
Developer Shed Weekly Writer | DevArticles Forum Moderator
Build Your Own KlipFolio Klip With PHP
FrankManno.com - Under Construction
Design Interactive Group - Under Construction

Reply With Quote
  #4  
Old September 11th, 2002, 01:59 PM
crazytrain81 crazytrain81 is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Posts: 232 crazytrain81 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
just a thought

does your class contain the constructor function? even if it contains nothing, it's required for a class to be created. also check what frank said about the file name, if you're using
PHP Code:
include("userDetails.php"
and the file is named userdetails.php, it's not going to work correctly.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > Class does not exist?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT