ecshop修改php的方法:首先將mysql擴(kuò)展的使用替換掉,改為使用mysqli或pdo;然后更改“cls_image.php”的“gd_version()”方法,將這個(gè)方法改為靜態(tài)方法;最后去除使用類(lèi)名的構(gòu)造函數(shù)。
ecshop支持PHP7的修改方法
(1)將mysql擴(kuò)展的使用替換掉,改為使用mysqli或pdo(推薦使用mysqli):
推薦:《ECShop教程》
從php5.5開(kāi)始,mysql擴(kuò)展將廢棄了。 具體更改的文件在于includes/cls_mysql.php。這是個(gè)不小的工程,文件代碼太長(zhǎng)……
if (!defined('DITAN_ECS')) { die('Hacking attempt'); } class cls_mysql { var $link_id = NULL; var $settings = array(); var $queryCount = 0; var $queryTime = ''; var $queryLog = array(); var $max_cache_time = 300; // 最大的緩存時(shí)間,以秒為單位 var $cache_data_dir = 'temp/query_caches/'; var $root_path = ''; var $error_message = array(); var $platform = ''; var $version = ''; var $dbhash = ''; var $starttime = 0; var $timeline = 0; var $timezone = 0; // 事務(wù)指令數(shù) protected $transTimes = 0; var $mysql_config_cache_file_time = 0; var $mysql_disable_cache_tables = array(); // 不允許被緩存的表,遇到將不會(huì)進(jìn)行緩存 function __construct($dbhost, $dbuser, $dbpw, $dbname = '', $charset = 'gbk', $pconnect = 0, $quiet = 0) { $this->cls_mysql($dbhost, $dbuser, $dbpw, $dbname, $charset, $pconnect, $quiet); } function cls_mysql($dbhost, $dbuser, $dbpw, $dbname = '', $charset = 'gbk', $pconnect = 0, $quiet = 0) { if (defined('EC_CHARSET')) { $charset = strtolower(str_replace('-', '', EC_CHARSET)); } if (defined('ROOT_PATH') && !$this->root_path) { $this->root_path = ROOT_PATH; } if ($quiet) { $this->connect($dbhost, $dbuser, $dbpw, $dbname, $charset, $pconnect, $quiet); } else { $this->settings = array( 'dbhost' => $dbhost, 'dbuser' => $dbuser, 'dbpw' => $dbpw, 'dbname' => $dbname, 'charset' => $charset, 'pconnect' => $pconnect ); } } function connect($dbhost, $dbuser, $dbpw, $dbname = '', $charset = 'utf8', $pconnect = 0, $quiet = 0) { if ($pconnect) { $this->link_id = new mysqli('p:'.$dbhost, $dbuser, $dbpw); if ($this->link_id->connect_error) { if (!$quiet) { $this->ErrorMsg("Can't pConnect MySQL Server($dbhost)!"); } return false; } } else { $this->link_id = new mysqli($dbhost, $dbuser, $dbpw); if ($this->link_id->connect_error) { if (!$quiet) { $this->ErrorMsg("Can't Connect MySQL Server($dbhost)!"); } return false; } } $this->dbhash = md5($this->root_path . $dbhost . $dbuser . $dbpw . $dbname); $this->version = $this->link_id->server_version; /* 對(duì)字符集進(jìn)行初始化 */ $this->link_id->set_charset($charset); $this->link_id->query("SET sql_mode=''"); $sqlcache_config_file = $this->root_path . $this->cache_data_dir . 'sqlcache_config_file_' . $this->dbhash . '.php'; @include($sqlcache_config_file); $this->starttime = time(); if ($this->max_cache_time && $this->starttime > $this->mysql_config_cache_file_time + $this->max_cache_time) { if ($dbhost != '.') { $result = $this->link_id->query("SHOW VARIABLES LIKE 'basedir'"); $row = $result->fetch_array(MYSQLI_ASSOC); $result->free(); if (!empty($row['Value']{1}) && $row['Value']{1} == ':' && !empty($row['Value']{2}) && $row['Value']{2} == "/") { $this->platform = 'WINDOWS'; } else { $this->platform = 'OTHER'; } } else { $this->platform = 'WINDOWS'; } if ($this->platform == 'OTHER' && ($dbhost != '.' && strtolower($dbhost) != 'localhost:3306' && $dbhost != '127.0.0.1:3306') || date_default_timezone_get() == 'UTC') { $result = $this->link_id->query("SELECT UNIX_TIMESTAMP() AS timeline, UNIX_TIMESTAMP('" . date('Y-m-d H:i:s', $this->starttime) . "') AS timezone"); $row = $result->fetch_array(MYSQLI_ASSOC); $result->free(); if ($dbhost != '.' && strtolower($dbhost) != 'localhost:3306' && $dbhost != '127.0.0.1:3306') { $this->timeline = $this->starttime - $row['timeline']; } if (date_default_timezone_get() == 'UTC') { $this->timezone = $this->starttime - $row['timezone']; } } $content = '<' . "?php\r\n" . '$this->mysql_config_cache_file_time = ' . $this->starttime . ";\r\n" . '$this->timeline = ' . $this->timeline . ";\r\n" . '$this->timezone = ' . $this->timezone . ";\r\n" . '$this->platform = ' . "'" . $this->platform . "';\r\n?" . '>'; @file_put_contents($sqlcache_config_file, $content); } /* 選擇數(shù)據(jù)庫(kù) */ if ($dbname) { if ($this->link_id->select_db($dbname) === false ) { if (!$quiet) { $this->ErrorMsg("Can't select MySQL database($dbname)!"); } return false; } else { return true; } } else { return true; } } function select_database($dbname) { return $this->link_id->select_db($dbname); } function set_mysql_charset($charset) { if (in_array(strtolower($charset), array('gbk', 'big5', 'utf-8', 'utf8'))) { $charset = str_replace('-', '', $charset); } $this->link_id->set_charset($charset); } function fetch_array($query, $result_type = MYSQLI_ASSOC) { $row = $query->fetch_array($result_type); $query->free(); return $row; } function query($sql, $type = '') { if ($this->link_id === NULL) { $this->connect($this->settings['dbhost'], $this->settings['dbuser'], $this->settings['dbpw'], $this->settings['dbname'], $this->settings['charset'], $this->settings['pconnect']); $this->settings = array(); } if ($this->queryCount++ <= 99) { $this->queryLog[] = $sql; } if ($this->queryTime == '') { if (PHP_VERSION >= '5.0.0') { $this->queryTime = microtime(true); } else { $this->queryTime = microtime(); } } /* 當(dāng)當(dāng)前的時(shí)間大于類(lèi)初始化時(shí)間的時(shí)候,自動(dòng)執(zhí)行 ping 這個(gè)自動(dòng)重新連接操作 */ if (time() > $this->starttime + 1) { $this->link_id->ping(); } if (!($query = $this->link_id->query($sql)) && $type != 'SILENT') { $this->error_message[]['message'] = 'MySQL Query Error'; $this->error_message[]['sql'] = $sql; $this->error_message[]['error'] = $this->link_id->error; $this->error_message[]['errno'] = $this->link_id->errno; $this->ErrorMsg(); return false; } if (defined('DEBUG_MODE') && (DEBUG_MODE & 8) == 8) { $logfilename = $this->root_path . DATA_DIR . '/mysql_query_' . $this->dbhash . '_' . date('Y_m_d') . '.log'; $str = $sql . "\n\n"; if (PHP_VERSION >= '5.0') { file_put_contents($logfilename, $str, FILE_APPEND); } else { $fp = @fopen($logfilename, 'ab+'); if ($fp) { fwrite($fp, $str); fclose($fp); } } } return $query; } function affected_rows() { return $this->link_id->affected_rows; } function error() { return $this->link_id->error; } function errno() { return $this->link_id->errno; } function result($query, $row) { $query->data_seek($row); $result = $query->fetch_row(); $query->free(); return $result; } function num_rows($query) { return $query->num_rows; } function num_fields($query) { return $this->link_id->field_count; } function free_result($query) { return $query->free(); } function insert_id() { return $this->link_id->insert_id; } function fetchRow($query) { return $query->fetch_assoc(); } function fetch_fields($query) { return $query->fetch_field(); } function version() { return $this->version; } function ping() { return $this->link_id->ping(); } function escape_string($unescaped_string) { return $this->link_id->real_escape_string($unescaped_string); } function close() { return $this->link_id->close(); } function ErrorMsg($message = '', $sql = '') { if ($message) { echo "DTXB info: $message\n\n "; //print('http://faq.comsenz.com/'); } else { echo "MySQL server error report:"; print_r($this->error_message); //echo " http://faq.comsenz.com/"; } exit; } /* 仿真 Adodb 函數(shù) */ function selectLimit($sql, $num, $start = 0) { if ($start == 0) { $sql .= ' LIMIT ' . $num; } else { $sql .= ' LIMIT ' . $start . ', ' . $num; } return $this->query($sql); } function getOne($sql, $limited = false) { if ($limited == true) { $sql = trim($sql . ' LIMIT 1'); } $res = $this->query($sql); if ($res !== false) { $row = $res->fetch_row(); $res->free(); if ($row !== false) { return $row[0]; } else { return ''; } } else { return false; } } function getOneCached($sql, $cached = 'FILEFIRST') { $sql = trim($sql . ' LIMIT 1'); $cachefirst = ($cached == 'FILEFIRST' || ($cached == 'MYSQLFIRST' && $this->platform != 'WINDOWS')) && $this->max_cache_time; if (!$cachefirst) { return $this->getOne($sql, true); } else { $result = $this->getSqlCacheData($sql, $cached); if (empty($result['storecache']) == true) { return $result['data']; } } $arr = $this->getOne($sql, true); if ($arr !== false && $cachefirst) { $this->setSqlCacheData($result, $arr); } return $arr; } function getAll($sql) { $res = $this->query($sql); if ($res !== false) { $arr = $res->fetch_all(MYSQLI_ASSOC); $res->free(); return $arr; } else { return false; } } function getAllCached($sql, $cached = 'FILEFIRST') { $cachefirst = ($cached == 'FILEFIRST' || ($cached == 'MYSQLFIRST' && $this->platform != 'WINDOWS')) && $this->max_cache_time; if (!$cachefirst) { return $this->getAll($sql); } else { $result = $this->getSqlCacheData($sql, $cached); if (empty($result['storecache']) == true) { return $result['data']; } } $arr = $this->getAll($sql); if ($arr !== false && $cachefirst) { $this->setSqlCacheData($result, $arr); } return $arr; } function getRow($sql, $limited = false) { if ($limited == true) { $sql = trim($sql . ' LIMIT 1'); } $res = $this->query($sql); if ($res !== false) { $result = $res->fetch_assoc(); $res->free(); return $result; } else { return false; } } function getRowCached($sql, $cached = 'FILEFIRST') { $cachefirst = ($cached == 'FILEFIRST' || ($cached == 'MYSQLFIRST' && $this->platform != 'WINDOWS')) && $this->max_cache_time; if (!$cachefirst) { return $this->getRow($sql, true); } else { $result = $this->getSqlCacheData($sql, $cached); if (empty($result['storecache']) == true) { return $result['data']; } } $arr = $this->getRow($sql, true); if ($arr !== false && $cachefirst) { $this->setSqlCacheData($result, $arr); } return $arr; } function getCol($sql) { $res = $this->query($sql); if ($res !== false) { $arr = array(); while ($row = $res->fetch_row()) { $arr[] = $row[0]; } $res->free(); return $arr; } else { return false; } } function getColCached($sql, $cached = 'FILEFIRST') { $cachefirst = ($cached == 'FILEFIRST' || ($cached == 'MYSQLFIRST' && $this->platform != 'WINDOWS')) && $this->max_cache_time; if (!$cachefirst) { return $this->getCol($sql); } else { $result = $this->getSqlCacheData($sql, $cached); if (empty($result['storecache']) == true) { return $result['data']; } } $arr = $this->getCol($sql); if ($arr !== false && $cachefirst) { $this->setSqlCacheData($result, $arr); } return $arr; } function autoExecute($table, $field_values, $mode = 'INSERT', $where = '', $querymode = '') { $field_names = $this->getCol('DESC ' . $table); $sql = ''; if ($mode == 'INSERT') { $fields = $values = array(); foreach ($field_names AS $value) { if (array_key_exists($value, $field_values) == true) { $fields[] = $value; $values[] = "'" . $field_values[$value] . "'"; } } if (!empty($fields)) { $sql = 'INSERT INTO ' . $table . ' (' . implode(', ', $fields) . ') VALUES (' . implode(', ', $values) . ')'; } } else { $sets = array(); foreach ($field_names AS $value) { if (array_key_exists($value, $field_values) == true) { $sets[] = $value . " = '" . $field_values[$value] . "'"; } } if (!empty($sets)) { $sql = 'UPDATE ' . $table . ' SET ' . implode(', ', $sets) . ' WHERE ' . $where; } } if ($sql) { return $this->query($sql, $querymode); } else { return false; } } function autoReplace($table, $field_values, $update_values, $where = '', $querymode = '') { $field_descs = $this->getAll('DESC ' . $table); $primary_keys = array(); foreach ($field_descs AS $value) { $field_names[] = $value['Field']; if ($value['Key'] == 'PRI') { $primary_keys[] = $value['Field']; } } $fields = $values = array(); foreach ($field_names AS $value) { if (array_key_exists($value, $field_values) == true) { $fields[] = $value; $values[] = "'" . $field_values[$value] . "'"; } } $sets = array(); foreach ($update_values AS $key => $value) { if (array_key_exists($key, $field_values) == true) { if (is_int($value) || is_float($value)) { $sets[] = $key . ' = ' . $key . ' + ' . $value; } else { $sets[] = $key . " = '" . $value . "'"; } } } $sql = ''; if (empty($primary_keys)) { if (!empty($fields)) { $sql = 'INSERT INTO ' . $table . ' (' . implode(', ', $fields) . ') VALUES (' . implode(', ', $values) . ')'; } } else { if ($this->version() >= '4.1') { if (!empty($fields)) { $sql = 'INSERT INTO ' . $table . ' (' . implode(', ', $fields) . ') VALUES (' . implode(', ', $values) . ')'; if (!empty($sets)) { $sql .= 'ON DUPLICATE KEY UPDATE ' . implode(', ', $sets); } } } else { if (empty($where)) { $where = array(); foreach ($primary_keys AS $value) { if (is_numeric($value)) { $where[] = $value . ' = ' . $field_values[$value]; } else { $where[] = $value . " = '" . $field_values[$value] . "'"; } } $where = implode(' AND ', $where); } if ($where && (!empty($sets) || !empty($fields))) { if (intval($this->getOne("SELECT COUNT(*) FROM $table WHERE $where")) > 0) { if (!empty($sets)) { $sql = 'UPDATE ' . $table . ' SET ' . implode(', ', $sets) . ' WHERE ' . $where; } } else { if (!empty($fields)) { $sql = 'REPLACE INTO ' . $table . ' (' . implode(', ', $fields) . ') VALUES (' . implode(', ', $values) . ')'; } } } } } if ($sql) { return $this->query($sql, $querymode); } else { return false; } } function setMaxCacheTime($second) { $this->max_cache_time = $second; } function getMaxCacheTime() { return $this->max_cache_time; } function getSqlCacheData($sql, $cached = '') { $sql = trim($sql); $result = array(); $result['filename'] = $this->root_path . $this->cache_data_dir . 'sqlcache_' . abs(crc32($this->dbhash . $sql)) . '_' . md5($this->dbhash . $sql) . '.php'; $data = @file_get_contents($result['filename']); if (isset($data{23})) { $filetime = substr($data, 13, 10); $data = substr($data, 23); if (($cached == 'FILEFIRST' && time() > $filetime + $this->max_cache_time) || ($cached == 'MYSQLFIRST' && $this->table_lastupdate($this->get_table_name($sql)) > $filetime)) { $result['storecache'] = true; } else { $result['data'] = @unserialize($data); if ($result['data'] === false) { $result['storecache'] = true; } else { $result['storecache'] = false; } } } else { $result['storecache'] = true; } return $result; } function setSqlCacheData($result, $data) { if ($result['storecache'] === true && $result['filename']) { @file_put_contents($result['filename'], '' . time() . serialize($data)); clearstatcache(); } } /* 獲取 SQL 語(yǔ)句中最后更新的表的時(shí)間,有多個(gè)表的情況下,返回最新的表的時(shí)間 */ function table_lastupdate($tables) { if ($this->link_id === NULL) { $this->connect($this->settings['dbhost'], $this->settings['dbuser'], $this->settings['dbpw'], $this->settings['dbname'], $this->settings['charset'], $this->settings['pconnect']); $this->settings = array(); } $lastupdatetime = '0000-00-00 00:00:00'; $tables = str_replace('`', '', $tables); $this->mysql_disable_cache_tables = str_replace('`', '', $this->mysql_disable_cache_tables); foreach ($tables AS $table) { if (in_array($table, $this->mysql_disable_cache_tables) == true) { $lastupdatetime = '2037-12-31 23:59:59'; break; } if (strstr($table, '.') != NULL) { $tmp = explode('.', $table); $sql = 'SHOW TABLE STATUS FROM `' . trim($tmp[0]) . "` LIKE '" . trim($tmp[1]) . "'"; } else { $sql = "SHOW TABLE STATUS LIKE '" . trim($table) . "'"; } $result = $this->link_id->query($sql); $row = $result->fetch_assoc(); if ($row['Update_time'] > $lastupdatetime) { $lastupdatetime = $row['Update_time']; } } $lastupdatetime = strtotime($lastupdatetime) - $this->timezone + $this->timeline; return $lastupdatetime; } function get_table_name($query_item) { $query_item = trim($query_item); $table_names = array(); /* 判斷語(yǔ)句中是不是含有 JOIN */ if (stristr($query_item, ' JOIN ') == '') { /* 解析一般的 SELECT FROM 語(yǔ)句 */ if (preg_match('/^SELECT.*?FROM\s*((?:`?\w+`?\s*\.\s*)?`?\w+`?(?:(?:\s*AS)?\s*`?\w+`?)?(?:\s*,\s*(?:`?\w+`?\s*\.\s*)?`?\w+`?(?:(?:\s*AS)?\s*`?\w+`?)?)*)/is', $query_item, $table_names)) { $table_names = preg_replace('/((?:`?\w+`?\s*\.\s*)?`?\w+`?)[^,]*/', '\1', $table_names[1]); return preg_split('/\s*,\s*/', $table_names); } } else { /* 對(duì)含有 JOIN 的語(yǔ)句進(jìn)行解析 */ if (preg_match('/^SELECT.*?FROM\s*((?:`?\w+`?\s*\.\s*)?`?\w+`?)(?:(?:\s*AS)?\s*`?\w+`?)?.*?JOIN.*$/is', $query_item, $table_names)) { $other_table_names = array(); preg_match_all('/JOIN\s*((?:`?\w+`?\s*\.\s*)?`?\w+`?)\s*/i', $query_item, $other_table_names); return array_merge(array($table_names[1]), $other_table_names[1]); } } return $table_names; } /* 設(shè)置不允許進(jìn)行緩存的表 */ function set_disable_cache_tables($tables) { if (!is_array($tables)) { $tables = explode(',', $tables); } foreach ($tables AS $table) { $this->mysql_disable_cache_tables[] = $table; } array_unique($this->mysql_disable_cache_tables); } /** +---------------------------------------------------------- * 啟動(dòng)事務(wù) +---------------------------------------------------------- * @access public +---------------------------------------------------------- * @return void +---------------------------------------------------------- */ public function startTrans() { //$this->initConnect(true); if ( !$this->link_id ) return false; //數(shù)據(jù)rollback 支持 if ($this->transTimes == 0) { $this->link_id->autocommit(FALSE); } $this->transTimes++; return ; } /** +---------------------------------------------------------- * 用于非自動(dòng)提交狀態(tài)下面的查詢提交 +---------------------------------------------------------- * @access public +---------------------------------------------------------- * @return boolen +---------------------------------------------------------- */ public function commit() { if ($this->transTimes > 0) { $result = $this->link_id->commit(); $this->transTimes = 0; if(!$result){ $this->error_message[]['message'] = 'MySQL Query Error'; $this->error_message[]['sql'] = $sql; $this->error_message[]['error'] = $this->link_id->error; $this->error_message[]['errno'] = $this->link_id->errno; $this->ErrorMsg(); return false; } } return true; } /** +---------------------------------------------------------- * 事務(wù)回滾 +---------------------------------------------------------- * @access public +---------------------------------------------------------- * @return boolen +---------------------------------------------------------- */ public function rollback() { if ($this->transTimes > 0) { $result = $this->link_id->rollback(); $this->transTimes = 0; if(!$result){ $this->error_message[]['message'] = 'MySQL Query Error'; $this->error_message[]['sql'] = $sql; $this->error_message[]['error'] = $this->link_id->error; $this->error_message[]['errno'] = $this->link_id->errno; $this->ErrorMsg(); return false; } } return true; } }
代碼當(dāng)中加了幾個(gè)方法,用于支持事務(wù)。
(2)更改cls_image.php的gd_version()方法,將這個(gè)方法改為靜態(tài)方法,并且所有調(diào)用此方法的地方,都改為靜態(tài)調(diào)用。
PHP5.6開(kāi)始,已經(jīng)不支持不兼容的上下文調(diào)用方法,并且產(chǎn)生 E_DEPRECATED 錯(cuò)誤(以前是 E_STRICT)。
更改如下:
includes/cls_images.php,(gd_version方法體添加static關(guān)鍵字) /** * 獲得服務(wù)器上的 GD 版本 * * @access public * @return int 可能的值為0,1,2 */ static function gd_version() { .... }
在好幾處調(diào)用此方法的地方都改為靜態(tài)調(diào)用,比如includes/cls_images.php的好幾個(gè)方法在調(diào)用時(shí)使用類(lèi)對(duì)象調(diào)用:
function make_thumb($img, $thumb_width = 0, $thumb_height = 0, $path = '', $bgcolor='') { $gd = $this->gd_version(); //獲取 GD 版本。0 表示沒(méi)有 GD 庫(kù),1 表示 GD 1.x,2 表示 GD 2.x 。。。 }
將其改為:
function make_thumb($img, $thumb_width = 0, $thumb_height = 0, $path = '', $bgcolor='') { $gd = self::gd_version(); //獲取 GD 版本。0 表示沒(méi)有 GD 庫(kù),1 表示 GD 1.x,2 表示 GD 2.x 。。。 }
還有includes/lib_base.php文件的gd_version函數(shù),改為:
function gd_version() { include_once(ROOT_PATH . 'includes/cls_image.php'); return cls_image::gd_version(); }
其他文件代碼在調(diào)用時(shí),最好改為調(diào)用lib_base文件的gd_version的函數(shù)??梢运阉鞲?。
(3)更改includes/lib_main.php文件的get_dyna_libs函數(shù),該第一行的代碼:
function get_dyna_libs($theme, $tmp) { $ext = end(explode('.', $tmp)); 。。。 }
更改為:
function get_dyna_libs($theme, $tmp) { $tmp_ext = explode('.', $tmp); $ext = end($tmp_ext); }
end方法的接受的參數(shù)必須是引用傳遞值,這里使用了explode方法返回值,不可以直接套用。
(4)includes/cls_template.php代碼:
preg_replace方法,自PHP5.5開(kāi)始 /e修飾符已經(jīng)廢棄,所以要使用preg_replace_callback代替。此代替有多處:
fetch_str方法:
fetch_str($source) { 。。。 return preg_replace_callback("/{([^\}\{\n]*)}/",'self::select_replace', $source); } //新增的方法 private function select_replace($matches){ return $this->select($matches[1]); }
select方法:
function select($tag) { 。。。 $pregReplace = preg_replace_callback("/(\'\\$[^,]+)/" , function($matches){ return stripslashes(trim($matches[1],'\'')); }, var_export($t, true)); 。。。 } smarty_prefilter_preCompile方法: $source = preg_replace_callback($pattern, function($matches){ return '{include file='.strtolower($matches[1]). '}'; }, $source);
(5)將所有類(lèi)的構(gòu)造函數(shù),都去除使用類(lèi)名的構(gòu)造函數(shù),保留__construct():
涉及此改動(dòng)的超多,用搜索一一找到并改動(dòng)吧……這個(gè)就不列舉了。
The above is the detailed content of How to modify and support PHP7 in ecshop. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undress AI Tool
Undress images for free

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

How to sort ecshop articles: 1. Sort by publication time, you can control the order of articles in the list by modifying the publication time of the article; 2. Sort by clicks, you can achieve this sorting by installing the "Article Click Ranking" plug-in Function, this plug-in can count the number of clicks on articles; 3. Sort by the number of comments, you can implement this sorting function by installing the "Article Comment Ranking" plug-in, which can count the number of comments on articles; 4. Sort by relevance, This sorting function can be achieved by installing the "Search Ranking" plug-in.

ecshop is a "B2C" architecture; ecshop is a B2C independent online store system, suitable for enterprises and individuals to quickly build personalized online stores; the system is a cross-platform open source program developed based on PHP language and MYSQL database architecture.

Features: 1. Open source system with flexibility, customizability and high scalability; 2. Support independent secondary development; 3. Rich templates and plug-ins; 4. Strong industry adaptability; 5. Avoid being constrained by software vendors; 6. Stronger reliability and stability; 7. Mobile H5 framework upgrade, based on VUE comprehensive replacement, more flexible and open; 8. Multi-level rebate function, supporting QR codes, posters and other promotion methods, unlimited fission development of distributors ; 8. The visual interaction of the management terminal is completely renewed, the UI is simple and beautiful, and the operating experience is upgraded; 9. Supports PHP7.2, and the performance is doubled.

Ecshop Product Management Advanced: Learn how to add fields, you need specific code examples. When using Ecshop for product management, you often encounter situations where you need to add some custom fields to meet specific needs. By adding fields, more precise product management and better user experience can be achieved. This article will introduce how to add fields in Ecshop and provide specific code examples. First, we need to clarify the need to add fields. For example, we need to add a "production date" field to the product details page to

ECShop is a B2C independent online store system. It is a cross-platform open source program developed based on PHP language and MYSQL database architecture. It is suitable for enterprises and individuals to quickly build personalized online stores. The characteristics of the ecshop mall system: 1. Support independent secondary development; 2. Rich templates and plug-ins; 3. Strong industry adaptability; 4. Avoid being constrained by software vendors; 5. Stronger reliability and stability.

Method to remove the copyright at the bottom of ecshop: 1. Modify the template file, the specific location is: themes/your_theme directory, find the footer.html file in this directory, open it with a text editor, find the code segment containing the copyright information, delete it or Comment out. Just save the file and close it; 2. To use the plug-in, log in to the backend, click plug-in management, search for copyright and other related keywords at the bottom, select a suitable plug-in to install and enable it; 3. To purchase a theme, purchase it on the official website of ECShop etc.

ecshop is a B2C model. ECShop is a B2C independent online store system, suitable for enterprises and individuals to quickly build personalized online stores. B2C refers to a model of e-commerce, and it is also a retail model that sells products and services directly to consumers; the payment method of B2C e-commerce is a combination of cash on delivery and online payment, and most companies choose logistics outsourcing for delivery. to save operating costs.

The functions of ecshop are: 1. Product management; 2. Promotion management; 3. Order management; 4. Advertising management; 5. Report statistics; 6. Article management; 7. Member management; 8. Permission management; 9. System settings; 10. Template management; 11. Database management; 12. SMS management, etc.
