» Quick Links
You can make money on these forums
We Share profits with you
Google
Google Adsense
Google Adwords
YPN
Yahoo
MSN Search
Web Directories
Web Hosting
Web Hosting Offers
Hosting News
Suggestions
Link Building
Domain Names
PHP Forums
MySQL Forums
» More Links
OSP News
Reseller Hosting
Shared Hosting
Dedicated Servers
Google Adsense
Search Engine Marketing
Link Development
Affiliate Marketing


» Advertising
Multiple DC PR Check

Free SEO Tools


Go Back   Webmaster Forums > Website Developement / Programming > PHP Programming and Tips

PHP Programming and Tips Discuss about PHP programming and Share Tips. Ask questions about Scripting and Errors.

Reply
 
Thread Tools Display Modes
  #1  
Old 07-30-2006, 12:31 PM
ghosty ghosty is offline
OSP Starters
 
Join Date: Jul 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
ghosty is on a distinguished road
Default decreasing class based on value

Please answer my peculiar problem

I am making a basic CMS currently. I am trying to make it so that user's can easily add on their own modifications, such as you might do to IPB or PHPBB. Well, in a mod file, a user contains a main class, so that I can include it in the core files and not run into variable usage problems. Originally I had it so that the class name was just "default_", but I ran into problems when mods tryed to include other mods into the mod file, since other mods also used the "default_" class name, and it messed up my system. Well, now when a mod is installed I want a database value of the class name to be added, so that when the mod is being access I can simply pull the class to create from the database, and create it. However, that's the problem. How do I create a type of object based off a value. In other words it looks something like:


Code:
$class_name = "Main_class";
$class = new $ -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
Revenue Sharing Ads ( ?):
  #2  
Old 07-30-2006, 12:33 PM
kaitlyn kaitlyn is offline
OSP Starters
 
Join Date: Mar 2006
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
kaitlyn is on a distinguished road
Default use eval()

Hey pal

I think you can use eval() to do that.

This should work for you.
Bye -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
Reply


Thread Tools
Display Modes

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
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
UK based hosting help!! repell Web Hosting Industry 3 12-15-2006 09:34 AM
API based hosting? Brucal Reseller Hosting Forum 1 11-17-2006 04:25 AM
unable to create class gathy PHP Programming and Tips 2 08-15-2006 02:26 PM
getting private class variables from outside the class maxima PHP Programming and Tips 3 07-29-2006 02:29 PM
Got Web Host Obtains New Class C IP's outsourcingplans Web Hosting Industry 0 02-10-2006 09:44 PM


All times are GMT. The time now is 09:00 PM.