首页 / 论坛BBS / PHPOK 咨询

2个网站都是PHPOK 4.X版本的,近日突然无法访问。

后主机商提供:通过查看您后台网站的PHP版本,发现您的网站是PHP7.4.16版本,但是您网站程序mysql_connect是用的PHP 5.4的数据库连接语句。


请教老大如何修改连接语句???

2条回复

  • 84457471@qq.com
    84457471@qq.com于04月12日 14:26发表回复

    Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/jsspeplq/public_html/framework/engine/db.php on line 167

    Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/jsspeplq/public_html/framework/engine/db.php on line 167

    Warning: Use of undefined constant MYSQL_ASSOC - assumed 'MYSQL_ASSOC' (this will throw an Error in a future version of PHP) in /home/jsspeplq/public_html/framework/init.php on line 657

    Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/jsspeplq/public_html/framework/engine/cache.php on line 213

    Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/jsspeplq/public_html/framework/engine/cache.php on line 213

    Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /home/jsspeplq/public_html/framework/engine/db/mysql.php:96 Stack trace: #0 /home/jsspeplq/public_html/framework/engine/db/mysql.php(114): db_mysql->connect() #1 /home/jsspeplq/public_html/framework/engine/db/mysql.php(149): db_mysql->check_connect() #2 /home/jsspeplq/public_html/framework/engine/db/mysql.php(183): db_mysql->query('SELECT site_id ...') #3 /home/jsspeplq/public_html/framework/model/site.php(168): db_mysql->get_one('SELECT site_id ...') #4 /home/jsspeplq/public_html/framework/init.php(375): site_model_base->site_info('www.jsspeaker.c...') #5 /home/jsspeplq/public_html/framework/init.php(2071): _init_phpok->init_site() #6 /home/jsspeplq/public_html/index.php(64): require('/home/jsspeplq/...') #7 {main} thrown in /home/jsspeplq/public_html/framework/engine/db/mysql.php on line 96


    这是网站错误提示!


  • skyboy
    skyboy于04月22日 14:22发表回复

    操作方法:

    第一步、将PHP版本降到5.5或5.6来

    第二步、升级OK系统到PHP5.x(升级方法查看:https://www.phpok.com/25799.html

    第三步、将PHP版本恢复到7.x


请先 登录注册,才支持回复