Dilemma w/ dynamic objects
Posted: Sun Aug 03, 2008 4:42 pm
I just got started w/ OSCommerce and PHP, and I'm puzzled abt an error PHPEclipse is giving me:
The substr() function is the issue. I can't call ANY function and set it to the class variable. Seems like it has to be a static variable.
Any workarounds?
See Line 16:Parser Error ";' expected after field declaration.
Code: Select all
class php3session {
var $name = PHP_SESSION_NAME;
var $auto_start = false;
var $referer_check = false;
var $save_path = PHP_SESSION_SAVE_PATH;
var $save_handler = 'php3session_files';
var $lifetime = 0;
var $cache_limiter = 'nocache';
var $cache_expire = 180;
var $use_cookies = true;
var $cookie_lifetime = 0;
[color=#FF0000] var $cookie_path = substr(DIR_WS_ADMIN, 0, -1);[/color]
var $cookie_domain = '';
var $gc_probability = 1;
var $gc_maxlifetime = 0;
var $serialize_handler = 'php';
var $ID;
var $nr_open_sessions = 0;
var $mod_name = '';
var $id;
var $delimiter = "\n";
var $delimiter_value = '[==]';
function php3session() {
$this->mod_name = $this->save_handler;
}
}Any workarounds?