帝国CMS图集PHP调用代码及调用图集第一张图片
<?php
$str=$navinfor[morepic];
$exp=explode("\\r\\n",$str);
$exp1=explode("::::::",$exp[0]);
?>
$exp1[1]?>" width="660" height="560" alt="<?=$exp1[2]?>" />
<?php
if($navinfor[morepic])
{
$exp=explode(chr(13),$navinfor[morepic]);
if($exp)
{
?>
<?php
foreach($exp as $k=>$v)
{
$exp2=explode('::::::',$v);
if($exp2[1])
{
echo '
$exp2[1].'" width="660" height="560">';
}
}
}
}
?>
<?php
if($navinfor[morepic])
{
$exp=explode(chr(13),$navinfor[morepic]);
if($exp)
{
?>
<?php
foreach($exp as $k=>$v)
{
$exp2=explode('::::::',$v);
if($exp2[0])
{
echo '
$exp2[0].'" width="60" height="50">';
}
}
}
}
?>
下面的方法比较好用
图片集调用代码:
<?php $picr=explode(egetzy('rn'),$navinfor[morepic]); for($p=0;$p<count($picr);$p++) { $spicr=explode("::::::",$picr[$p]); ?> 小图地址:$spicr[0]?>" /> 大图地址:
$spicr[1]?>" /> 图片名称:<?=$spicr[2]?> <?php } ?> 输出的代码:
![]()
![]()
![]()
调用图集中第一张图片: <?php $str=$navinfor[morepic]; $exp=explode("::::::",$str); ?>
$exp[1];?>" alt="第一张" /> <?php ?>
