获取文章图片数量
/*****************
 * 获取图片数量
 * @since 2016.07.01
 **/
function hui_post_imgNum($content){
   $output =
   preg_match_all("/\]*>/i", $content,$matches);
   $cnt = count( $matches[1] );
       return $cnt;
} 调用方法:
<?php echo ''.hui_post_imgNum($this->content).'' ; ?>