在我的错误日志中,我遇到了以下错误:
PHP警告:strip\\u tags()要求参数1为字符串
这似乎使我的服务器崩溃。
我不太了解服务器配置/后端开发,但这是受影响的代码:
<?php
# show categories
$categories = get_the_term_list( $post->ID, \'ev_categories\', \'<p>\', \', \', \'</p>\' );
$categories = strip_tags( $categories );
echo $categories;
if ($categories <> \'\') echo \'<div class="clear"></div>\';
?>
?php
# show categories
$categories = get_the_term_list( $post->ID, \'ev_categories\', \'<p>\', \', \', \'</p>\' );
$categories = strip_tags( $categories );
if ( strpos($categories,\'arts and culture\') !== false ) { $catID = 1; };
if ( strpos($categories,\'business\') !== false ) { $catID = 2; };
if ( strpos($categories,\'community\') !== false ) { $catID = 3; };
if ( strpos($categories,\'education\') !== false ) { $catID = 4; };
if ( strpos($categories,\'sport\') !== false ) { $catID = 5; };
?>
<?php
# show categories
$categories = get_the_term_list( $post->ID, \'ev_categories\', \'<p>\', \', \', \'</p>\' );
$categories = strip_tags( $categories );
if ( strpos($categories,\'arts and culture\') !== false ) { $catID = 1; };
if ( strpos($categories,\'business\') !== false ) { $catID = 2; };
if ( strpos($categories,\'community\') !== false ) { $catID = 3; };
if ( strpos($categories,\'education\') !== false ) { $catID = 4; };
if ( strpos($categories,\'sport\') !== false ) { $catID = 5; };
# show locations
$locations = get_the_term_list( $post->ID, \'ev_locations\', \'<p>\', \', \', \'</p>\' );
$locations = strip_tags( $locations );
#echo $locations ;
?>
每次,与下面的第二行相关:
$categories = get_the_term_list( $post->ID, \'ev_categories\', \'<p>\', \', \', \'</p>\' );
$categories = strip_tags( $categories );
如果有人知道我怎么解决这个问题,那就太好了,