致命错误Wordpress

时间:2017-06-17 18:59:16

标签: php wordpress

我有错误:

  

致命错误:未捕获错误:在/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(& #39; / home / keramxd / d ...')#4 /home/keramxd/domains/coaching.yotta.style/public_html/index.php(17):require(' / home /第60行/home/keramxd/domains/coaching.yotta.style/public_html/wp-content/themes/video/functions.php中的#ram {/ d}投放#5 {main}

我在function.php中的第60行:

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

1 个答案:

答案 0 :(得分:-1)

自PHP 4.3.0起,此函数为deprecated,并在PHP 7.0.0中删除

来自cale_b的评论:

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