Commit 6e3d623d authored by 蒋林's avatar 蒋林

支持php 7.*

parent 2ebb6f57
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
<fileset dir="./"> <fileset dir="./">
<patternset> <patternset>
<exclude name="e/config/"/> <exclude name="e/config/"/>
<exclude name="e/back_conf/"/>
<include name="**/**"/> <include name="**/**"/>
</patternset> </patternset>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
$editor=1; $editor=1;
//字符过虑 //字符过虑
function escape_str($str){ function escape_str($str){
$str=mysql_real_escape_string($str); $str=mysqli_real_escape_string($str);
$str=str_replace('\\\'','\'\'',$str); $str=str_replace('\\\'','\'\'',$str);
$str=str_replace("\\\\","\\\\\\\\",$str); $str=str_replace("\\\\","\\\\\\\\",$str);
$str=str_replace('$','\$',$str); $str=str_replace('$','\$',$str);
......
...@@ -233,7 +233,7 @@ if($public_r[addnews_ok]) ...@@ -233,7 +233,7 @@ if($public_r[addnews_ok])
</tr> </tr>
<tr> <tr>
<td height="23">MYSQL版本:</td> <td height="23">MYSQL版本:</td>
<td><? echo @mysql_get_server_info();?></td> <td><? echo @mysqli_get_server_info();?></td>
</tr> </tr>
<tr> <tr>
<td height="23">全局变量:</td> <td height="23">全局变量:</td>
......
...@@ -7,7 +7,7 @@ define('EmpireCMSConfig',TRUE); ...@@ -7,7 +7,7 @@ define('EmpireCMSConfig',TRUE);
$ecms_config=array(); $ecms_config=array();
//base //base
$ecms_config['site_url'] = "http://testserv.pp.cc/s"; $ecms_config['site_url'] = "http://s.test.yunyamooc.com";
//数据库设置 //数据库设置
$ecms_config['db']['usedb']='mysql'; //数据库类型 $ecms_config['db']['usedb']='mysql'; //数据库类型
......
...@@ -116,13 +116,13 @@ function GetPhpSafemod(){ ...@@ -116,13 +116,13 @@ function GetPhpSafemod(){
} }
//是否支持mysql //是否支持mysql
function CanMysql(){ function CanMysql(){
$r['can']=HaveFun("mysql_connect"); $r['can']=HaveFun("mysqli_connect");
$r['result']=$r[can]=="支持"?ReturnResult(1):ReturnResult(0); $r['result']=$r[can]=="支持"?ReturnResult(1):ReturnResult(0);
return $r; return $r;
} }
//取得mysql版本 //取得mysql版本
function GetMysqlVer(){ function GetMysqlVer(){
$r['ver']=@mysql_get_server_info(); $r['ver']=@mysqli_get_server_info();
if(empty($r['ver'])) if(empty($r['ver']))
{ {
$r['ver']="---"; $r['ver']="---";
...@@ -136,8 +136,8 @@ function GetMysqlVer(){ ...@@ -136,8 +136,8 @@ function GetMysqlVer(){
} }
//取得mysql版本(数据库) //取得mysql版本(数据库)
function GetMysqlVerForDb(){ function GetMysqlVerForDb(){
$sql=mysql_query("select version() as version"); $sql=mysqli_query("select version() as version");
$r=mysql_fetch_array($sql); $r=mysqli_fetch_array($sql);
return ReturnMysqlVer($r['version']); return ReturnMysqlVer($r['version']);
} }
//返回mysql版本 //返回mysql版本
...@@ -366,11 +366,11 @@ function DoRunQuery($sql,$mydbchar,$mydbtbpre,$mydbver){ ...@@ -366,11 +366,11 @@ function DoRunQuery($sql,$mydbchar,$mydbtbpre,$mydbver){
{ {
$name=preg_replace("/CREATE TABLE `([a-z0-9_]+)` .*/is","\\1",$query); $name=preg_replace("/CREATE TABLE `([a-z0-9_]+)` .*/is","\\1",$query);
echo"建立数据表: <b>".$name."</b> 完毕......<br>"; echo"建立数据表: <b>".$name."</b> 完毕......<br>";
mysql_query(DoCreateTable($query,$mydbver,$mydbchar)) or die(mysql_error()."<br>".$query); mysqli_query(DoCreateTable($query,$mydbver,$mydbchar)) or die(mysqli_error()."<br>".$query);
} }
else else
{ {
mysql_query($query) or die(mysql_error()."<br>".$query); mysqli_query($query) or die(mysqli_error()."<br>".$query);
} }
} }
} }
...@@ -452,9 +452,9 @@ function FirstAdmin($add){ ...@@ -452,9 +452,9 @@ function FirstAdmin($add){
$addtime=time(); $addtime=time();
$addip=ins_egetip(); $addip=ins_egetip();
$addipport=ins_egetipport(); $addipport=ins_egetipport();
$sql=mysql_query("INSERT INTO `".$dbtbpre."enewsuser`(userid,username,password,rnd,adminclass,groupid,checked,styleid,filelevel,salt,loginnum,lasttime,lastip,truename,email,classid,pretime,preip,addtime,addip,userprikey,salt2,lastipport,preipport,addipport) VALUES (1,'$username','$password','$rnd','',1,0,1,0,'$salt',0,0,'','','',0,0,'','$addtime','$addip','$userprikey','$salt2','$addipport','$addipport','$addipport');"); $sql=mysqli_query("INSERT INTO `".$dbtbpre."enewsuser`(userid,username,password,rnd,adminclass,groupid,checked,styleid,filelevel,salt,loginnum,lasttime,lastip,truename,email,classid,pretime,preip,addtime,addip,userprikey,salt2,lastipport,preipport,addipport) VALUES (1,'$username','$password','$rnd','',1,0,1,0,'$salt',0,0,'','','',0,0,'','$addtime','$addip','$userprikey','$salt2','$addipport','$addipport','$addipport');");
$sql2=mysql_query("INSERT INTO `".$dbtbpre."enewsuseradd` VALUES (1,0,'','','',0);"); $sql2=mysqli_query("INSERT INTO `".$dbtbpre."enewsuseradd` VALUES (1,0,'','','',0);");
mysql_close(); mysqli_close();
//认证码 //认证码
RepEcmsConfigLoginauth($add); RepEcmsConfigLoginauth($add);
if($sql) if($sql)
...@@ -474,7 +474,7 @@ function InstallDefaultData($add){ ...@@ -474,7 +474,7 @@ function InstallDefaultData($add){
$dbver=InstallConnectDb($ecms_config['db']['dbver'],$ecms_config['db']['dbserver'],$ecms_config['db']['dbport'],$ecms_config['db']['dbusername'],$ecms_config['db']['dbpassword'],$ecms_config['db']['dbname'],$ecms_config['db']['setchar'],$ecms_config['db']['dbchar']); $dbver=InstallConnectDb($ecms_config['db']['dbver'],$ecms_config['db']['dbserver'],$ecms_config['db']['dbport'],$ecms_config['db']['dbusername'],$ecms_config['db']['dbpassword'],$ecms_config['db']['dbname'],$ecms_config['db']['setchar'],$ecms_config['db']['dbchar']);
//执行SQL语句 //执行SQL语句
DoRunQuery(ReturnInstallSql(1),$ecms_config['db']['dbchar'],$dbtbpre,$ecms_config['db']['dbver']); DoRunQuery(ReturnInstallSql(1),$ecms_config['db']['dbchar'],$dbtbpre,$ecms_config['db']['dbver']);
mysql_close(); mysqli_close();
echo"导入测试数据完毕!<script>self.location.href='index.php?enews=firstadmin&f=5&defaultdata=$add[defaultdata]';</script>"; echo"导入测试数据完毕!<script>self.location.href='index.php?enews=firstadmin&f=5&defaultdata=$add[defaultdata]';</script>";
exit(); exit();
} }
...@@ -485,7 +485,7 @@ function InstallTemplateData($add){ ...@@ -485,7 +485,7 @@ function InstallTemplateData($add){
$dbver=InstallConnectDb($ecms_config['db']['dbver'],$ecms_config['db']['dbserver'],$ecms_config['db']['dbport'],$ecms_config['db']['dbusername'],$ecms_config['db']['dbpassword'],$ecms_config['db']['dbname'],$ecms_config['db']['setchar'],$ecms_config['db']['dbchar']); $dbver=InstallConnectDb($ecms_config['db']['dbver'],$ecms_config['db']['dbserver'],$ecms_config['db']['dbport'],$ecms_config['db']['dbusername'],$ecms_config['db']['dbpassword'],$ecms_config['db']['dbname'],$ecms_config['db']['setchar'],$ecms_config['db']['dbchar']);
//执行SQL语句 //执行SQL语句
DoRunQuery(ReturnInstallSql(2),$ecms_config['db']['dbchar'],$dbtbpre,$ecms_config['db']['dbver']); DoRunQuery(ReturnInstallSql(2),$ecms_config['db']['dbchar'],$dbtbpre,$ecms_config['db']['dbver']);
mysql_close(); mysqli_close();
if(empty($add['defaultdata'])) if(empty($add['defaultdata']))
{ {
InstallDelArticleTxtFile(); InstallDelArticleTxtFile();
...@@ -504,7 +504,7 @@ function InstallModData($add){ ...@@ -504,7 +504,7 @@ function InstallModData($add){
$dbver=InstallConnectDb($ecms_config['db']['dbver'],$ecms_config['db']['dbserver'],$ecms_config['db']['dbport'],$ecms_config['db']['dbusername'],$ecms_config['db']['dbpassword'],$ecms_config['db']['dbname'],$ecms_config['db']['setchar'],$ecms_config['db']['dbchar']); $dbver=InstallConnectDb($ecms_config['db']['dbver'],$ecms_config['db']['dbserver'],$ecms_config['db']['dbport'],$ecms_config['db']['dbusername'],$ecms_config['db']['dbpassword'],$ecms_config['db']['dbname'],$ecms_config['db']['setchar'],$ecms_config['db']['dbchar']);
//执行SQL语句 //执行SQL语句
DoRunQuery(ReturnInstallSql(3),$ecms_config['db']['dbchar'],$dbtbpre,$ecms_config['db']['dbver']); DoRunQuery(ReturnInstallSql(3),$ecms_config['db']['dbchar'],$dbtbpre,$ecms_config['db']['dbver']);
mysql_close(); mysqli_close();
echo"导入系统模型数据完毕,正进入模板数据导入......<script>self.location.href='index.php?enews=templatedata&f=4&ok=1&defaultdata=$add[defaultdata]';</script>"; echo"导入系统模型数据完毕,正进入模板数据导入......<script>self.location.href='index.php?enews=templatedata&f=4&ok=1&defaultdata=$add[defaultdata]';</script>";
exit(); exit();
} }
...@@ -516,7 +516,7 @@ function InstallConnectDb($phome_use_dbver,$phome_db_server,$phome_db_port,$phom ...@@ -516,7 +516,7 @@ function InstallConnectDb($phome_use_dbver,$phome_db_server,$phome_db_port,$phom
{ {
$dblocalhost.=":".$phome_db_port; $dblocalhost.=":".$phome_db_port;
} }
$link=@mysql_connect($dblocalhost,$phome_db_username,$phome_db_password); $link=@mysqli_connect($dblocalhost,$phome_db_username,$phome_db_password);
if(!$link) if(!$link)
{ {
InstallShowMsg('您的数据库用户名或密码有误,链接不上MYSQL数据库'); InstallShowMsg('您的数据库用户名或密码有误,链接不上MYSQL数据库');
...@@ -544,26 +544,26 @@ function InstallConnectDb($phome_use_dbver,$phome_db_server,$phome_db_port,$phom ...@@ -544,26 +544,26 @@ function InstallConnectDb($phome_use_dbver,$phome_db_server,$phome_db_port,$phom
} }
if($q) if($q)
{ {
@mysql_query('SET '.$q); @mysqli_query('SET '.$q);
} }
} }
$db=@mysql_select_db($phome_db_dbname); $db=@mysqli_select_db($phome_db_dbname);
//数据库不存在 //数据库不存在
if(!$db) if(!$db)
{ {
if($phome_use_dbver>='4.1') if($phome_use_dbver>='4.1')
{ {
$createdb=@mysql_query("CREATE DATABASE IF NOT EXISTS ".$phome_db_dbname." DEFAULT CHARACTER SET ".$phome_db_dbchar); $createdb=@mysqli_query("CREATE DATABASE IF NOT EXISTS ".$phome_db_dbname." DEFAULT CHARACTER SET ".$phome_db_dbchar);
} }
else else
{ {
$createdb=@mysql_query("CREATE DATABASE IF NOT EXISTS ".$phome_db_dbname); $createdb=@mysqli_query("CREATE DATABASE IF NOT EXISTS ".$phome_db_dbname);
} }
if(!$createdb) if(!$createdb)
{ {
InstallShowMsg('您输入的数据库名不存在'); InstallShowMsg('您输入的数据库名不存在');
} }
@mysql_select_db($phome_db_dbname); @mysqli_select_db($phome_db_dbname);
} }
return $phome_use_dbver; return $phome_use_dbver;
} }
...@@ -588,10 +588,10 @@ function SetDb($add){ ...@@ -588,10 +588,10 @@ function SetDb($add){
RepEcmsConfig($add,$siteurl); RepEcmsConfig($add,$siteurl);
//执行SQL语句 //执行SQL语句
DoRunQuery(ReturnInstallSql(0),$add['mydbchar'],$add['mydbtbpre'],$add['mydbver']); DoRunQuery(ReturnInstallSql(0),$add['mydbchar'],$add['mydbtbpre'],$add['mydbver']);
@mysql_query("update ".$add['mydbtbpre']."enewspublic set newsurl='$siteurl',fileurl='".$siteurl."d/file/',softversion='$version',keyrnd='$add[keyrnd]',downpass='$add[downpass]' limit 1"); @mysqli_query("update ".$add['mydbtbpre']."enewspublic set newsurl='$siteurl',fileurl='".$siteurl."d/file/',softversion='$version',keyrnd='$add[keyrnd]',downpass='$add[downpass]' limit 1");
@mysql_query("update ".$add['mydbtbpre']."enewspl_set set plurl='".$siteurl."e/pl/' limit 1"); @mysqli_query("update ".$add['mydbtbpre']."enewspl_set set plurl='".$siteurl."e/pl/' limit 1");
@mysql_query("update ".$add['mydbtbpre']."enewsshoppayfs set payurl='".$siteurl."e/payapi/ShopPay.php?paytype=alipay' where payid=3"); @mysqli_query("update ".$add['mydbtbpre']."enewsshoppayfs set payurl='".$siteurl."e/payapi/ShopPay.php?paytype=alipay' where payid=3");
@mysql_close(); @mysqli_close();
echo"配置数据库完毕,正进入系统模型数据导入......<script>self.location.href='index.php?enews=moddata&f=4&ok=1&defaultdata=$add[defaultdata]';</script>"; echo"配置数据库完毕,正进入系统模型数据导入......<script>self.location.href='index.php?enews=moddata&f=4&ok=1&defaultdata=$add[defaultdata]';</script>";
exit(); exit();
} }
......
...@@ -555,7 +555,7 @@ if(!$shorttag) ...@@ -555,7 +555,7 @@ if(!$shorttag)
<td width="43%"><div align="center"><strong>注释</strong></div></td> <td width="43%"><div align="center"><strong>注释</strong></div></td>
</tr> </tr>
<?php <?php
$getmysqlver=@mysql_get_server_info(); $getmysqlver=@mysqli_get_server_info();
$selectmysqlver=$getmysqlver; $selectmysqlver=$getmysqlver;
if(empty($selectmysqlver)) if(empty($selectmysqlver))
{ {
......
...@@ -132,7 +132,7 @@ function do_dbconnect($dbhost,$dbport,$dbusername,$dbpassword,$dbname){ ...@@ -132,7 +132,7 @@ function do_dbconnect($dbhost,$dbport,$dbusername,$dbpassword,$dbname){
{ {
$dblocalhost.=':'.$dbport; $dblocalhost.=':'.$dbport;
} }
$dblink=@mysql_connect($dblocalhost,$dbusername,$dbpassword); $dblink=@mysqli_connect($dblocalhost,$dbusername,$dbpassword);
if(!$dblink) if(!$dblink)
{ {
echo"Cann't connect to DB!"; echo"Cann't connect to DB!";
...@@ -152,10 +152,10 @@ function do_dbconnect($dbhost,$dbport,$dbusername,$dbpassword,$dbname){ ...@@ -152,10 +152,10 @@ function do_dbconnect($dbhost,$dbport,$dbusername,$dbpassword,$dbname){
} }
if($q) if($q)
{ {
@mysql_query('SET '.$q,$dblink); @mysqli_query($dblink, 'SET '.$q);
} }
} }
@mysql_select_db($dbname,$dblink); @mysqli_select_db($dblink, $dbname);
return $dblink; return $dblink;
} }
...@@ -169,8 +169,8 @@ function DoSetDbChar($dbchar){ ...@@ -169,8 +169,8 @@ function DoSetDbChar($dbchar){
global $link; global $link;
if($dbchar&&$dbchar!='auto') if($dbchar&&$dbchar!='auto')
{ {
//@mysql_query("set names '".$dbchar."';"); //@mysqli_query("set names '".$dbchar."';");
@mysql_query('set character_set_connection='.$dbchar.',character_set_results='.$dbchar.',character_set_client=binary;',$link); @mysqli_query($link, 'set character_set_connection='.$dbchar.',character_set_results='.$dbchar.',character_set_client=binary;');
} }
} }
...@@ -178,7 +178,7 @@ function db_close(){ ...@@ -178,7 +178,7 @@ function db_close(){
global $link; global $link;
if($link) if($link)
{ {
@mysql_close($link); @mysqli_close($link);
} }
} }
......
...@@ -9,95 +9,95 @@ class mysqlquery ...@@ -9,95 +9,95 @@ class mysqlquery
var $num;//返回记录数 var $num;//返回记录数
var $r;//返回数组 var $r;//返回数组
var $id;//返回数据库id号 var $id;//返回数据库id号
//执行mysql_query()语句 //执行mysqli_query()语句
function query($query){ function query($query){
global $ecms_config; global $ecms_config;
$this->sql=mysql_query($query,return_dblink($query)) or die($ecms_config['db']['showerror']==1?mysql_error().'<br>'.str_replace($GLOBALS['dbtbpre'],'***_',$query):'DbError'); $this->sql=mysqli_query(return_dblink($query), $query) or die($ecms_config['db']['showerror']==1?mysqli_error($GLOBALS['link']).'<br>'.str_replace($GLOBALS['dbtbpre'],'***_',$query):'DbError');
return $this->sql; return $this->sql;
} }
//执行mysql_query()语句2 //执行mysqli_query()语句2
function query1($query){ function query1($query){
$this->sql=mysql_query($query,return_dblink($query)); $this->sql=mysqli_query(return_dblink($query), $query);
return $this->sql; return $this->sql;
} }
//执行mysql_query()语句(选择数据库USE) //执行mysqli_query()语句(选择数据库USE)
function usequery($query){ function usequery($query){
global $ecms_config; global $ecms_config;
$this->sql=mysql_query($query,$GLOBALS['link']) or die($ecms_config['db']['showerror']==1?mysql_error().'<br>'.str_replace($GLOBALS['dbtbpre'],'***_',$query):'DbError'); $this->sql=mysqli_query($GLOBALS['link'], $query) or die($ecms_config['db']['showerror']==1?mysqli_error($GLOBALS['link']).'<br>'.str_replace($GLOBALS['dbtbpre'],'***_',$query):'DbError');
if($GLOBALS['linkrd']) if($GLOBALS['linkrd'])
{ {
mysql_query($query,$GLOBALS['linkrd']); mysqli_query($query,$GLOBALS['linkrd']);
} }
return $this->sql; return $this->sql;
} }
//执行mysql_query()语句(操作数据库) //执行mysqli_query()语句(操作数据库)
function updatesql($query){ function updatesql($query){
global $ecms_config; global $ecms_config;
$this->sql=mysql_query($query,return_dblink($query)) or die($ecms_config['db']['showerror']==1?mysql_error().'<br>'.str_replace($GLOBALS['dbtbpre'],'***_',$query):'DbError'); $this->sql=mysqli_query(return_dblink($query), $query) or die($ecms_config['db']['showerror']==1?mysqli_error($GLOBALS['link']).'<br>'.str_replace($GLOBALS['dbtbpre'],'***_',$query):'DbError');
return $this->sql; return $this->sql;
} }
//执行mysql_fetch_array() //执行mysqli_fetch_array()
function fetch($sql)//此方法的参数是$sql就是sql语句执行结果 function fetch($sql)//此方法的参数是$sql就是sql语句执行结果
{ {
$this->r=mysql_fetch_array($sql); $this->r=mysqli_fetch_array($sql);
return $this->r; return $this->r;
} }
//执行fetchone(mysql_fetch_array()) //执行fetchone(mysqli_fetch_array())
//此方法与fetch()的区别是:1、此方法的参数是$query就是sql语句 //此方法与fetch()的区别是:1、此方法的参数是$query就是sql语句
//2、此方法用于while(),for()数据库指针不会自动下移,而fetch()可以自动下移。 //2、此方法用于while(),for()数据库指针不会自动下移,而fetch()可以自动下移。
function fetch1($query) function fetch1($query)
{ {
$this->sql=$this->query($query); $this->sql=$this->query($query);
$this->r=mysql_fetch_array($this->sql); $this->r=mysqli_fetch_array($this->sql);
return $this->r; return $this->r;
} }
//执行mysql_num_rows() //执行mysqli_num_rows()
function num($query)//此类的参数是$query就是sql语句 function num($query)//此类的参数是$query就是sql语句
{ {
$this->sql=$this->query($query); $this->sql=$this->query($query);
$this->num=mysql_num_rows($this->sql); $this->num=mysqli_num_rows($this->sql);
return $this->num; return $this->num;
} }
//执行numone(mysql_num_rows()) //执行numone(mysqli_num_rows())
//此方法与num()的区别是:1、此方法的参数是$sql就是sql语句的执行结果。 //此方法与num()的区别是:1、此方法的参数是$sql就是sql语句的执行结果。
function num1($sql) function num1($sql)
{ {
$this->num=mysql_num_rows($sql); $this->num=mysqli_num_rows($sql);
return $this->num; return $this->num;
} }
//执行numone(mysql_num_rows()) //执行numone(mysqli_num_rows())
//统计记录数 //统计记录数
function gettotal($query) function gettotal($query)
{ {
$this->r=$this->fetch1($query); $this->r=$this->fetch1($query);
return $this->r['total']; return $this->r['total'];
} }
//执行free(mysql_result_free()) //执行free(mysqli_result_free())
//此方法的参数是$sql就是sql语句的执行结果。只有在用到mysql_fetch_array的情况下用 //此方法的参数是$sql就是sql语句的执行结果。只有在用到mysqli_fetch_array的情况下用
function free($sql) function free($sql)
{ {
mysql_free_result($sql); mysqli_free_result($sql);
} }
//执行seek(mysql_data_seek()) //执行seek(mysqli_data_seek())
//此方法的参数是$sql就是sql语句的执行结果,$pit为执行指针的偏移数 //此方法的参数是$sql就是sql语句的执行结果,$pit为执行指针的偏移数
function seek($sql,$pit) function seek($sql,$pit)
{ {
mysql_data_seek($sql,$pit); mysqli_data_seek($sql,$pit);
} }
//执行id(mysql_insert_id()) //执行id(mysqli_insert_id())
function lastid()//取得最后一次执行mysql数据库id号 function lastid()//取得最后一次执行mysql数据库id号
{ {
$this->id=mysql_insert_id($GLOBALS['link']); $this->id=mysqli_insert_id($GLOBALS['link']);
if($this->id<0) if($this->id<0)
{ {
$this->id=$this->gettotal('SELECT last_insert_id() as total'); $this->id=$this->gettotal('SELECT last_insert_id() as total');
} }
return $this->id; return $this->id;
} }
//返回影响数量(mysql_affected_rows()) //返回影响数量(mysqli_affected_rows())
function affectnum()//取得操作数据表后受影响的记录数 function affectnum()//取得操作数据表后受影响的记录数
{ {
return mysql_affected_rows($GLOBALS['link']); return mysqli_affected_rows($GLOBALS['link']);
} }
} }
?> ?>
\ No newline at end of file
...@@ -2520,7 +2520,7 @@ function LoadModToMysqlFour($query){ ...@@ -2520,7 +2520,7 @@ function LoadModToMysqlFour($query){
//字符过虑 //字符过虑
function LMEscape_str($str){ function LMEscape_str($str){
$str=mysql_real_escape_string($str); $str=mysqli_real_escape_string($str);
$str=str_replace('\\\'','\'\'',$str); $str=str_replace('\\\'','\'\'',$str);
$str=str_replace("\\\\","\\\\\\\\",$str); $str=str_replace("\\\\","\\\\\\\\",$str);
$str=str_replace('$','\$',$str); $str=str_replace('$','\$',$str);
......
...@@ -10,7 +10,7 @@ $ecms_config=array(); ...@@ -10,7 +10,7 @@ $ecms_config=array();
$ecms_config['site_url'] = "http://s.yunya.com"; $ecms_config['site_url'] = "http://s.yunya.com";
//数据库设置 //数据库设置
$ecms_config['db']['usedb']='mysql'; //数据库类型 $ecms_config['db']['usedb']='mysqli'; //数据库类型
$ecms_config['db']['dbver']='5.6'; //数据库版本 $ecms_config['db']['dbver']='5.6'; //数据库版本
$ecms_config['db']['dbserver']='192.168.1.181'; //数据库登录地址 $ecms_config['db']['dbserver']='192.168.1.181'; //数据库登录地址
$ecms_config['db']['dbport']='3306'; //端口,不填为按默认 $ecms_config['db']['dbport']='3306'; //端口,不填为按默认
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment