我写了一幅简单的图像包裹,对一只双fold子进行检查,并展示双手里的所有图像,即有密码去除这些图像,但却没有工作,我很想知道,为什么任何帮助都对PHP的ir子功能来说是巨大的。 我有环绕这一联系的灯塔,因此,外加反应 该守则如下:
<?
// USER OPTIONS DEDFINED HERE
$dir = "img/"; //folder with images
$height ="196px"; //image height on page its displayed in full in lightbox
$width ="320px"; //image width on page its displayed in full in lightbox
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Gallery</title>
<link href="css/css.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/prototype.js"></script>
<script type="text/javascript" src="js/scriptaculous.js?load=effects,builder"></script>
<script type="text/javascript" src="js/lightbox.js"></script>
</head>
<?
//open directory
if ($opendir = opendir($dir));
{
//read dir
while (FALSE !== ($file = readdir($opendir)))
{
if ($file!="."&&$file!="..")
echo "<div class= imgwraper >";
echo"<a href= $dir$file rel= lightbox[gallery] title= $filename >";
echo "<img src= $dir$file alt= width= $width height= $height />";
echo"</a>";
echo "<div class= name_box >";
echo current(explode( . , $file));
echo "</div>";
echo "</div>";
}
closedir($opendir);
}
?>
预支
Lewis