Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- somaboy mx
December 21, 2005, 11:24 am
rate this thread
class body from within the class?
I need to do something like this, but it isn't working:
// in one file I define these settings
// then include this file in the file with the class definition
$this->dbuser = _DBUSER_;
$this->dbpass = _DBPASS_;
$this->dbhost = _DBHOST_;
$this->dbname = _DBNAME_;
Re: accessing constants outside class body
This example code have to be working. I allways use code constructions
--Are you sure that your .inc code begin with '<?php ' and ends '?>'.
--Another one error that can be here is the path to *.inc file. You can
don't see warnings by apache configuration ("php_value error_reporting
7" for example) but really that file not found and don't including. Try
to check path to that *.inc file.
Sorry for my inglish and best regards.