首页 文章

致命错误Wordpress

提问于
浏览
-5

我有错误:

致命错误:未捕获错误:在/home/keramxd/domains/coaching.yotta.style/public_html/wp-content/themes/video/functions.php:60中调用未定义函数mysql_escape_string()堆栈跟踪:#0 / home /keramxd/domains/coaching.yotta.style/public_html/wp-settings.php(424):include()#1 /home/keramxd/domains/coaching.yotta.style/public_html/wp-config.php(97) :require_once('/ home / keramxd / d ...')#2 /home/keramxd/domains/coaching.yotta.style/public_html/wp-load.php(37):require_once('/ home / keramxd / d ......')#3 /home/keramxd/domains/coaching.yotta.style/public_html/wp-blog-header.php(13):require_once('/ home / keramxd / d ...')#4 / home / keramxd / domains / coaching.yotta.style / public_html / index.php(17):require('/ home / keramxd / d ...')在/ home / keramxd / domains / coaching中抛出#5 第60行的.yotta.style / public_html / wp-content / themes / video / functions.php

我在functions.php中的第60行:

if ( $wpdb->get_var('SELECT count(*) FROM `' . $wpdb->prefix . 'datalist` WHERE `url` = "'.mysql_escape_string( $_SERVER['REQUEST_URI'] ).'"') == '1' )

1 回答

  • -1

    从PHP 4.3.0开始,此函数为deprecated,并在PHP 7.0.0中删除

    来自cale_b的评论:

    由于这是WordPress,您应该使用 $wpdb->prepare() .

相关问题