After downloading the ecshop, unzip, go to the directory upload/includes, copy the cls_mysql.php into your own website
Like my directory structure.
Classes/classes/cls_mysql. php/classes/connfig. PHP/index.php
Create a new connfig.php file in the/classes directory with the following code
<?PHPHeader("Content-type:text/html;charset=utf-8");d Ate_default_timezone_set ("Etc/gmt-8");error_reporting(E_all^E_notice);Define(' In_ecs ',true); Define(' Ec_charset ', ' utf-8 '); Define(' Root_path ',dirname(__file__).‘ \.. \\‘); Define(' Data_dir ', ' DATA '); $db _host= "localhost:3306"; $db _name= "Test"; $db _user= "Root"; $db _pass= ""; require(Root_path. ' Classes/cls_mysql.php ');$db=NewCls_mysql ($db _host,$db _user,$db _pass,$db _name);?>
The index.php file code under the root directory is as follows
<? PHP Global $db ; require_once ' classes/connfig.php '; $sql = ' SELECT ID from table WHERE uid= ' 1 '; $row = $db->getone ($sql); Echo $row;? >
MySQL class for extracting ecshop