4.11 应用举例 图片集


avatar
pcwnas 2022-10-04 193

内容页:

<?php
$picr=explode(egetzy('rn'),$navinfor[morepic]);
for($p=0;$p<count($picr);$p++)
{
$spicr=explode("::::::",$picr[$p]);
?>
        <li>
          <div class="picimg"><img src="<?=$spicr[0]?>" /></div>
          <div class="pictxt">
            <h3>[!--title--]</h3>
          </div>
        </li>

<?php
}
?>

内容页图片统计

<?php

$sl=empty($navinfor[morepic])?0:count(explode(chr(13),$navinfor[morepic]));

echo $sl;

?>

内容页分割

<?php
$arr = array();
$arr = $navinfor['morepic'];
$newarr = explode(egetzy('rn'),$arr);
$count = count(explode(egetzy('rn'),$navinfor[morepic]));//图集的图片数量 
for($i=0;$i<$count;$i++)
{
$s_arr = array();
$s_arr[] = $newarr[$i];
$str = $s_arr[0];
$bot_arr = explode("::::::", $str);
$spic = $bot_arr[0];//小图
$bpic = $bot_arr[1];//大图
$picinfo = $bot_arr[2];//图片说明

echo '  <li> <a href="javascript:void(0);"><img src="'.$spic.'"  alt="'.$picinfo.'" bigimg="'.$bpic.'"  text="'.$picinfo.'"  /></a></li>';

}
?>

暂无评论

当前仅支持登录后发布评论