您好,欢迎访问一九零五行业门户网

显示器驱动程序已停止响应 并且已成功恢复 php 显示指定路径下的图片

复制代码 代码如下:
function getalldirandfile($path)
{
if(is_file($path))
{
if(isimage($path))
{
$str=;
$str.='
';
$str.=;
$path=iconv(gb2312,utf-8,$path);
$str.=.$path. ;
$str.=
;
$str.=
;
echo $str;
}
}
else
{
$resource=opendir($path);
while ($file=readdir($resource))
{
if($file!=. && $file!=..)
{
getalldirandfile($path./.$file);
}
}
}
}
function isimage($filepath)
{
$filetypearray=array(jpg,png,bmp,jpeg,gif,ico);
$filepath=strtolower($filepath);
$lastposition=strrpos($filepath,.);
$isimage=false;
if($lastposition>=0)
{
$filetype=substr($filepath,$lastposition+1,strlen($filepath)-$lastposition);
if(in_array($filetype,$filetypearray))
{
$isimage=true;
}
}
return $isimage;
}
以上就介绍了显示器驱动程序已停止响应 并且已成功恢复 php 显示指定路径下的图片,包括了显示器驱动程序已停止响应 并且已成功恢复方面的内容,希望对php教程有兴趣的朋友有所帮助。
其它类似信息

推荐信息