TweakTown Forums  

Go Back   TweakTown Forums > Software Discussion > Web Development

Reply
 
LinkBack Thread Tools Rating: Thread Rating: 2 votes, 3.00 average. Display Modes
  #1 (permalink)  
Old 06-15-2006, 01:32 AM
Junior Member
 
Join Date: Oct 2005
Posts: 4
Default how to change a CONSTANT defined in a class file?

Hi, I have the folowing php question:
I have 3 files:

the file a.php wich includes this php class: [ include "b.php"; ] (and more code...)
the file b.php wich includes this other php class: [ require_once("c.php"); ] (and other functions of course...)
and the file c.php wich has this definition: [ define('MAX_CUPS', 148); ] (and other definitions...)

My question is how can I overwrite the defined "MAX_CUPS" value for instance if I need sometimes 148, sometimes 400, sometimes 800, etc.
How cai I set this "MAX_CUPS" value again from the a.php file without having to edit the c.php file?
I read that "A constant's value cannot be changed after it is set", but im triying to get help with this issue...

Thanks indvance.

Aldo.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 06-15-2006, 01:50 AM
Junior Member
 
Join Date: Oct 2005
Posts: 4
Default Re: how to change a CONSTANT defined in a class file?

this is a typical sample of code in a.php, so as you can see there are nothing to edit or there are no variables to redefine, because i dont know where in the b.php its calling the 'MAX_CUPS' defined in the c.php
and i cannot edit the b.php and c.php because they are zend optimized.
a question, zend is only a ctypter or it optimizes the runtime too?

Code:
cupsSpec('MyCup1',0,0,120);
$cups->cupsParse();
?>
Aldo
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +8. The time now is 07:24 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.2
Copyright (c) Tweak Town Pty Ltd
You Rated this Thread: