我有錯誤:致命錯誤的WordPress
Fatal error: Uncaught Error: Call to undefined function mysql_escape_string() in /home/keramxd/domains/coaching.yotta.style/public_html/wp-content/themes/video/functions.php:60 Stack trace: #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...') #5 {main} thrown in /home/keramxd/domains/coaching.yotta.style/public_html/wp-content/themes/video/functions.php on line 60
我在functions.php的60行:
if ($wpdb->get_var('SELECT count(*) FROM `' . $wpdb->prefix . 'datalist` WHERE `url` = "'.mysql_escape_string($_SERVER['REQUEST_URI']).'"') == '1')
可能重複[mysql \ _real \ _escape \ _string是未定義的](https://stackoverflow.com/questions/13856639/mysql-real-escape-string-is-undefined) – HPierce
我將PHP更改爲5.7和I見網站。接下來的錯誤: 不推薦使用:mysql_escape_string():此函數已棄用;請改用mysql_real_escape_string()。 in /home/keramxd/domains/coaching.yotta.style/public_html/wp-content/themes/video/functions.php on line 60 警告:無法修改標題信息 - 已經發送的標題(在/ home/keramxd/domains/coaching.yotta.style/public_html/wp-content/themes/video/functions.php:60)在/home/keramxd/domains/coaching.yotta.style/public_html/wp-includes/pluggable.php上line 1210 – Marek
12g in pluggable.php: \t header(「Location:$ location」,true,$ status); – Marek