I want to use php to get Image file information in folder,and dynamic add image in div then add into web page,below is my code,but it does not work, please help me.
www.un.org/Depts/DGACM/index_french.htm
<div class="scrollContainer">
<?php
var $i = 1;
var $panel_id = "panel_";
var $imgUrl = "./Img/";
var $file=NULL;
var $dir = opendir("Img");
while( ($file = readdir($dir)) !== false ){
$panel_id = $panel_id.$i;
$imgUrl = $imgUrl.$file;
echo "$( .scrollContainer ).html("
."$( <div/> )"
.".addClass( panel )"
.".id(".$panel_id.")"
.".append("
."$( <div/> )"
.".addClass( inside )"
.".append("
."$( <img/> )"
.".attr( src ,".$imgUrl.")"
.")"
.".append("
."$( <p/> )"
.".text(".$file.")"
.")"
.")"
.");";
$panel_id = "panel_";
$imgUrl = "./Img/";
$i = $i + 1;
} // while
closedir( $dir );
?>
<div>
我是新手,请帮助我,我对此表示赞赏。