怎么注释掉PHP段落代码 下面的这一段落都要注释掉,不要了,怎么弄
<!--#Header--><?phpif($npdv_options['switchheader']==2){/*Ifdisplayasingleimageforhea...
<!-- #Header -->
<?php if ($npdv_options['switchheader'] == 2) { /* If display a single image for header is selected */ ?>
<a href="<?php bloginfo('url'); ?>" alt="<?php bloginfo('name'); ?>" title="<?php bloginfo('name'); ?>"><img src="<?php echo $npdv_options["headerimage"]; ?>" style="max-width:970px" alt="<?php bloginfo('name'); ?>" /></a>
<?php } elseif($npdv_options['switchheader'] == 1) { /* If header with quotes option is selected */
include (TEMPLATEPATH . '/headerWithQ.php');
} else { /* If header with Advertisement option is selected */
include (TEMPLATEPATH . '/headerWithAd.php');
} ?>
<!-- // header --> 展开
<?php if ($npdv_options['switchheader'] == 2) { /* If display a single image for header is selected */ ?>
<a href="<?php bloginfo('url'); ?>" alt="<?php bloginfo('name'); ?>" title="<?php bloginfo('name'); ?>"><img src="<?php echo $npdv_options["headerimage"]; ?>" style="max-width:970px" alt="<?php bloginfo('name'); ?>" /></a>
<?php } elseif($npdv_options['switchheader'] == 1) { /* If header with quotes option is selected */
include (TEMPLATEPATH . '/headerWithQ.php');
} else { /* If header with Advertisement option is selected */
include (TEMPLATEPATH . '/headerWithAd.php');
} ?>
<!-- // header --> 展开
4个回答
展开全部
如果只是不想显示,用<!-- -->注释掉即可。
<!-- #Header -->
<!--
<?php if ($npdv_options['switchheader'] == 2) { /* If display a single image for header is selected */ ?>
<a href="<?php bloginfo('url'); ?>" alt="<?php bloginfo('name'); ?>" title="<?php bloginfo('name'); ?>"><img src="<?php echo $npdv_options["headerimage"]; ?>" style="max-width:970px" alt="<?php bloginfo('name'); ?>" /></a>
<?php } elseif($npdv_options['switchheader'] == 1) { /* If header with quotes option is selected */
include (TEMPLATEPATH . '/headerWithQ.php');
} else { /* If header with Advertisement option is selected */
include (TEMPLATEPATH . '/headerWithAd.php');
} ?>
-->
<!-- // header -->
<!-- #Header -->
<!--
<?php if ($npdv_options['switchheader'] == 2) { /* If display a single image for header is selected */ ?>
<a href="<?php bloginfo('url'); ?>" alt="<?php bloginfo('name'); ?>" title="<?php bloginfo('name'); ?>"><img src="<?php echo $npdv_options["headerimage"]; ?>" style="max-width:970px" alt="<?php bloginfo('name'); ?>" /></a>
<?php } elseif($npdv_options['switchheader'] == 1) { /* If header with quotes option is selected */
include (TEMPLATEPATH . '/headerWithQ.php');
} else { /* If header with Advertisement option is selected */
include (TEMPLATEPATH . '/headerWithAd.php');
} ?>
-->
<!-- // header -->
展开全部
应该是下面注释吧,不知道是不是你想要的效果:不过了希望对你有帮助!~!
<!-- #Header -->
<?php //if ($npdv_options['switchheader'] == 2) { /* If display a single image for header is selected */ ?>
<!--a href="<?php //bloginfo('url'); ?>" alt="<?php //bloginfo('name'); ?>" title="<?php// bloginfo('name'); ?>"><img src="<?php //echo $npdv_options["headerimage"]; ?>" style="max-width:970px" alt="<?php //bloginfo('name'); ?>" /></a>
<?php //} elseif($npdv_options['switchheader'] == 1) { /* If header with quotes option is selected */
// include (TEMPLATEPATH . '/headerWithQ.php');
// } else { /* If header with Advertisement option is selected */
// include (TEMPLATEPATH . '/headerWithAd.php');
// } ?>
<!-- // header -->
<!-- #Header -->
<?php //if ($npdv_options['switchheader'] == 2) { /* If display a single image for header is selected */ ?>
<!--a href="<?php //bloginfo('url'); ?>" alt="<?php //bloginfo('name'); ?>" title="<?php// bloginfo('name'); ?>"><img src="<?php //echo $npdv_options["headerimage"]; ?>" style="max-width:970px" alt="<?php //bloginfo('name'); ?>" /></a>
<?php //} elseif($npdv_options['switchheader'] == 1) { /* If header with quotes option is selected */
// include (TEMPLATEPATH . '/headerWithQ.php');
// } else { /* If header with Advertisement option is selected */
// include (TEMPLATEPATH . '/headerWithAd.php');
// } ?>
<!-- // header -->
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
// 单行注释
/* 内容 */ 多行注释
/* 内容 */ 多行注释
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询