Bug #1758: using Class after includes statement stop the parsing
| From: | carmelo at melting-soft dot com | Date: | Tue, 20 Jul 1999 17:23:45 +0000 |
| Subject: | Bug #1758: using Class after includes statement stop the parsing | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-8782@lists.php.net to get a copy of this message | ||
From: carmelo@melting-soft.com
Operating system: linux SUSE 5.x apache php mysql
PHP version: 4.0 Beta 1
PHP Bug Type: Parser error
Bug description: using Class after includes statement stop the parsing
first I used this script :
if (!$config) {
$theroot="/usr/local/etc/httpd/sites/idm-conseil.com";
$euro=6.55957; //conversion euro vers francs
include "phlib/db_mysql.inc";
include "phlib/db_usql.inc";
include "phlib/table.inc";
include "phlib/tmpl_table.inc";
include "epa/listbox.inc";
include "epa/checkboxes.inc";
$config=1;
Class DB_DH extends DB_USql {
var $Host = "";
var $Database = "directhotel";
var $User = "root";
var $Password = "";
}
} // fin if (!$config)
the class DB_DH register but the variable are blank when I instantiate an object.
then I modified to this one
$theroot="/usr/local/etc/httpd/sites/idm-conseil.com";
$euro=6.55957; //conversion euro vers francs
include "phlib/db_mysql.inc";
include "phlib/db_usql.inc";
include "phlib/table.inc";
include "phlib/tmpl_table.inc";
include "epa/listbox.inc";
include "epa/checkboxes.inc";
Class DB_DH extends DB_USql {
var $Host = "";
var $Database = "directhotel";
var $User = "root";
var $Password = "";
}
and I only have a message saying that I had no data.
then I separated the class statement in one php include :
file local.inc contains :
Class DB_DH extends DB_USql {
var $Host = "";
var $Database = "directhotel";
var $User = "root";
var $Password = "";
}
file config.inc contains:
$theroot="/usr/local/etc/httpd/sites/idm-conseil.com";
$euro=6.55957; //conversion euro vers francs
include "phlib/db_mysql.inc";
include "phlib/db_usql.inc";
include "phlib/table.inc";
include "phlib/tmpl_table.inc";
include "epa/listbox.inc";
include "epa/checkboxes.inc";
include "local.inc";
and it works fine. but this is only a round away.
bye