我的 wordpress 主题错误
My wordpress theme error
我的wordpress主题错误,文件功能的所有内容都显示到首页了。来人帮帮我 。
P/s : 抱歉,我用的是 google 翻译,可能会有点混乱。
:D
演示:http://phimmi.com/
Notice: Undefined offset: 1 in /var/www/phimmi.com/htdocs/wp-content/mu-plugins/gd-system-plugin/class-gd-system-plugin-config.php on line 56
'home-head', 'name' => 'Home', 'description' => 'Đây là phần nội dung của site', 'before_widget' => '', 'after_widget' => '
', 'before_title' => '', 'after_title' => '' )); register_sidebar(array( 'id' => 'home-block', 'name' => 'Home Block', 'description' => 'Đây là block dưới phim đề cử', 'before_widget' => '', 'after_widget' => '
', 'before_title' => '', 'after_title' => '' )); register_sidebar(array( 'id' => 'single-1', 'name' => 'Single 1', 'description' => 'Đây là head ads trong bài viết', 'before_widget' => '', 'after_widget' => '
', 'before_title' => '', 'after_title' => '' )); register_sidebar(array( 'id' => 'single-2', 'name' => 'Single 2', 'description' => 'Đây là ads trên khung bình luận trong bài viết', 'before_widget' => '', 'after_widget' => '
', 'before_title' => '', 'after_title' => '' )); register_sidebar(array( 'id' => 'sidebar-1', 'name' => 'Sidebar 1', 'description' => 'Đây là ô thứ nhất bên sidebar', 'before_widget' => '', 'after_widget' => '
', 'before_title' => '', 'after_title' => '' )); register_sidebar(array( 'id' => 'sidebar-2', 'name' => 'Sidebar 2', 'description' => 'Đây là ô thứ hai bên sidebar', 'before_widget' => '', 'after_widget' => '
', 'before_title' => '', 'after_title' => '' )); register_sidebar(array( 'id' => 'sidebar-3', 'name' => 'Sidebar 3', 'description' => 'Đây là ô thứ ba bên sidebar', 'before_widget' => '', 'after_widget' => '
', 'before_title' => '', 'after_title' => '' )); register_sidebar(array( 'id' => 'sidebar-4', 'name' => 'Sidebar 4', 'description' => 'Đây là ô thứ tư bên sidebar', 'before_widget' => '', 'after_widget' => '
', 'before_title' => '', 'after_title' => '' )); register_sidebar(array( 'id' => 'sidebar-5', 'name' => 'Sidebar 5', 'description' => 'Đây là ô thứ năm bên sidebar', 'before_widget' => '', 'after_widget' => '
', 'before_title' => '', 'after_title' => '' )); register_nav_menu('nav-menu', 'Main menu'); //-------function------// function create_tw_widget(){ register_widget('tw_index_show_cat'); register_widget('tw_sidebar'); } function getidvideoyt(){ $url = get_the_content(); preg_match("#(?<=v=)[a-zA-Z0-9-]+(?=&)|(?<=v\/)[^&\n]+(?=\?)|(?<=v=)[^&\n]+|(?<=youtu.be/)[^&\n]+#", $url, $id); if(!empty($id)) { $id = $id[0]; } return $id; } function getytvideoLength($inputSeconds) { $secondsInAMinute = 60; $secondsInAnHour = 60 * $secondsInAMinute; $secondsInADay = 24 * $secondsInAnHour; // extract days $days = floor($inputSeconds / $secondsInADay); // extract hours $hourSeconds = $inputSeconds % $secondsInADay; $hours = floor($hourSeconds / $secondsInAnHour); // extract minutes $minuteSeconds = $hourSeconds % $secondsInAnHour; $minutes = floor($minuteSeconds / $secondsInAMinute); // extract the remaining seconds $remainingSeconds = $minuteSeconds % $secondsInAMinute; $seconds = ceil($remainingSeconds); // DAYS if( (int)$days == 0 ) $days = ''; else $days = (int)$days . ':'; // HOURS if( (int)$hours == 0 ) $hours = ''; else $hours = (int)$hours . ':'; // MINUTES if( (int)$minutes == 0 ) $minutes = '0:'; else $minutes = (int)$minutes . ':'; // SECONDS if( (int)$seconds == 0 ) $seconds = '00'; elseif( (int)$seconds < 10 ) $seconds = '0' . (int)$seconds; return $days . $hours . $minutes . $seconds; } function tw_rewrite() { add_rewrite_rule('^([^/]+)/(xem-phim|xem-trailer|download).html$','index.php?name=$matches[1]&tw_action=$matches[2]', 'top'); add_rewrite_rule('^([^/]+)/xem-phim/tap-([0-9]+)-server-([0-9]+).html$','index.php?name=$matches[1]&tw_action=xem-phim&tw_episode=$matches[2]&tw_server=$matches[3]', 'top'); flush_rewrite_rules(); } function query_vars($public_query_vars) { $public_query_vars[] = "tw_action"; $public_query_vars[] = "tw_server"; $public_query_vars[] = "tw_episode"; return $public_query_vars; } function tw_update_view_post(){ $update = get_option('tw_view_last_update'); if($update !== false){ $date = getdate(); if($update != $date['mday']){ update_option('tw_view_last_update', $date['mday']); delete_post_meta_by_key('tw_view_post_day'); if($date['wday'] == '1') delete_post_meta_by_key('tw_view_post_week'); if($date['mday'] == 1) delete_post_meta_by_key('tw_view_post_mon'); } } else add_option('tw_view_last_update', 0, null, 'no'); } function curlimdb($url){ $ch = @curl_init(); curl_setopt($ch, CURLOPT_URL, $url); $head[] = "Connection: keep-alive"; $head[] = "Keep-Alive: 300"; $head[] = "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7"; $head[] = "Accept-Language: en-us,en;q=0.5"; curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.124 Safari/537.36'); curl_setopt($ch, CURLOPT_HTTPHEADER, $head); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
Your PHP code blocks all start with <?
instead of <?php
, 结果,代码根本没有被 PHP 解析。我想不出主题开发人员决定这样做的任何充分理由,所以您最好选择不同的主题。
但是,您可以通过将 short_open_tag=On
添加到 php.ini 文件并重新启动网络服务器来解决此问题。 More information here.
我的wordpress主题错误,文件功能的所有内容都显示到首页了。来人帮帮我 。 P/s : 抱歉,我用的是 google 翻译,可能会有点混乱。 :D
演示:http://phimmi.com/
Notice: Undefined offset: 1 in /var/www/phimmi.com/htdocs/wp-content/mu-plugins/gd-system-plugin/class-gd-system-plugin-config.php on line 56
'home-head', 'name' => 'Home', 'description' => 'Đây là phần nội dung của site', 'before_widget' => '', 'after_widget' => '
', 'before_title' => '', 'after_title' => '' )); register_sidebar(array( 'id' => 'home-block', 'name' => 'Home Block', 'description' => 'Đây là block dưới phim đề cử', 'before_widget' => '', 'after_widget' => '
', 'before_title' => '', 'after_title' => '' )); register_sidebar(array( 'id' => 'single-1', 'name' => 'Single 1', 'description' => 'Đây là head ads trong bài viết', 'before_widget' => '', 'after_widget' => '
', 'before_title' => '', 'after_title' => '' )); register_sidebar(array( 'id' => 'single-2', 'name' => 'Single 2', 'description' => 'Đây là ads trên khung bình luận trong bài viết', 'before_widget' => '', 'after_widget' => '
', 'before_title' => '', 'after_title' => '' )); register_sidebar(array( 'id' => 'sidebar-1', 'name' => 'Sidebar 1', 'description' => 'Đây là ô thứ nhất bên sidebar', 'before_widget' => '', 'after_widget' => '
', 'before_title' => '', 'after_title' => '' )); register_sidebar(array( 'id' => 'sidebar-2', 'name' => 'Sidebar 2', 'description' => 'Đây là ô thứ hai bên sidebar', 'before_widget' => '', 'after_widget' => '
', 'before_title' => '', 'after_title' => '' )); register_sidebar(array( 'id' => 'sidebar-3', 'name' => 'Sidebar 3', 'description' => 'Đây là ô thứ ba bên sidebar', 'before_widget' => '', 'after_widget' => '
', 'before_title' => '', 'after_title' => '' )); register_sidebar(array( 'id' => 'sidebar-4', 'name' => 'Sidebar 4', 'description' => 'Đây là ô thứ tư bên sidebar', 'before_widget' => '', 'after_widget' => '
', 'before_title' => '', 'after_title' => '' )); register_sidebar(array( 'id' => 'sidebar-5', 'name' => 'Sidebar 5', 'description' => 'Đây là ô thứ năm bên sidebar', 'before_widget' => '', 'after_widget' => '
', 'before_title' => '', 'after_title' => '' )); register_nav_menu('nav-menu', 'Main menu'); //-------function------// function create_tw_widget(){ register_widget('tw_index_show_cat'); register_widget('tw_sidebar'); } function getidvideoyt(){ $url = get_the_content(); preg_match("#(?<=v=)[a-zA-Z0-9-]+(?=&)|(?<=v\/)[^&\n]+(?=\?)|(?<=v=)[^&\n]+|(?<=youtu.be/)[^&\n]+#", $url, $id); if(!empty($id)) { $id = $id[0]; } return $id; } function getytvideoLength($inputSeconds) { $secondsInAMinute = 60; $secondsInAnHour = 60 * $secondsInAMinute; $secondsInADay = 24 * $secondsInAnHour; // extract days $days = floor($inputSeconds / $secondsInADay); // extract hours $hourSeconds = $inputSeconds % $secondsInADay; $hours = floor($hourSeconds / $secondsInAnHour); // extract minutes $minuteSeconds = $hourSeconds % $secondsInAnHour; $minutes = floor($minuteSeconds / $secondsInAMinute); // extract the remaining seconds $remainingSeconds = $minuteSeconds % $secondsInAMinute; $seconds = ceil($remainingSeconds); // DAYS if( (int)$days == 0 ) $days = ''; else $days = (int)$days . ':'; // HOURS if( (int)$hours == 0 ) $hours = ''; else $hours = (int)$hours . ':'; // MINUTES if( (int)$minutes == 0 ) $minutes = '0:'; else $minutes = (int)$minutes . ':'; // SECONDS if( (int)$seconds == 0 ) $seconds = '00'; elseif( (int)$seconds < 10 ) $seconds = '0' . (int)$seconds; return $days . $hours . $minutes . $seconds; } function tw_rewrite() { add_rewrite_rule('^([^/]+)/(xem-phim|xem-trailer|download).html$','index.php?name=$matches[1]&tw_action=$matches[2]', 'top'); add_rewrite_rule('^([^/]+)/xem-phim/tap-([0-9]+)-server-([0-9]+).html$','index.php?name=$matches[1]&tw_action=xem-phim&tw_episode=$matches[2]&tw_server=$matches[3]', 'top'); flush_rewrite_rules(); } function query_vars($public_query_vars) { $public_query_vars[] = "tw_action"; $public_query_vars[] = "tw_server"; $public_query_vars[] = "tw_episode"; return $public_query_vars; } function tw_update_view_post(){ $update = get_option('tw_view_last_update'); if($update !== false){ $date = getdate(); if($update != $date['mday']){ update_option('tw_view_last_update', $date['mday']); delete_post_meta_by_key('tw_view_post_day'); if($date['wday'] == '1') delete_post_meta_by_key('tw_view_post_week'); if($date['mday'] == 1) delete_post_meta_by_key('tw_view_post_mon'); } } else add_option('tw_view_last_update', 0, null, 'no'); } function curlimdb($url){ $ch = @curl_init(); curl_setopt($ch, CURLOPT_URL, $url); $head[] = "Connection: keep-alive"; $head[] = "Keep-Alive: 300"; $head[] = "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7"; $head[] = "Accept-Language: en-us,en;q=0.5"; curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.124 Safari/537.36'); curl_setopt($ch, CURLOPT_HTTPHEADER, $head); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
Your PHP code blocks all start with <?
instead of <?php
, 结果,代码根本没有被 PHP 解析。我想不出主题开发人员决定这样做的任何充分理由,所以您最好选择不同的主题。
但是,您可以通过将 short_open_tag=On
添加到 php.ini 文件并重新启动网络服务器来解决此问题。 More information here.