cre装载6.4.1 admin

时间:2014-10-07 15:20:43

标签: php mysql

我在localhost和live server上安装了cre Loaded 6.4.1

在localhost上的

我在管理面板中收到错误

Deprecated: mysql_connect(): 
  The mysql extension is deprecated and will be removed in the future: 
  use mysqli or PDO instead 
in C:\xampp\htdocs\osc\admin\includes\functions\database.php on line 19

我还在实时服务器上安装了cre,但是管理面板不能正常工作(管理面板正在打开) 在管理页面上面临错误。

404 Page Not Found
Sorry! The page you requested is unavailable. 
Please use your browser's Back button, or go to the home page.

1 个答案:

答案 0 :(得分:0)

mysql_ * PHP函数现已弃用,将来将从PHP中删除。因此,您需要使用MySQLi或PDO,就像错误通知警告您一样。

PDO

$ db = new PDO(' mysql:host = localhost; dbname = testdb; charset = utf8',' username',' password'); $ result = $ db-> exec(" INSERT INTO table(firstname,lastname)VAULES(' John',' Doe')");

库MySQLi

$ db = new mysqli($ DBServer,$ DBUser,$ DBPass,$ DBName); $ result = $ db-> query(" INSERT INTO table(firstname,lastname)VAULES(' John',' Doe')");