Home > Backend Development > PHP Tutorial > php获取本地图片文件并生成xml文件输出具体思路_php技巧

php获取本地图片文件并生成xml文件输出具体思路_php技巧

WBOY
Release: 2016-05-17 09:05:22
Original
984 people have browsed it
复制代码 代码如下:

$dir="upload/";
$dir_res=opendir($dir);
$fileFormat=array(0=>".jpg",1=>".gif",2=>".png",3=>".bmp");
$xmlData = "";
$xmlData .= "\n";
while($filen=readdir($dir_res))
{
for($i=0;$i{
if(substr($filen,strpos($filen,"."))==$fileFormat[$i])
{

$xmlData .= "\n";
$xmlData .= "" .$dir.$filen. "\n";
$xmlData .= "
\n";
break ;
}
}
}
$xmlData .= "
\n";
print $xmlData;
closedir($dir_res);
?>

跟本站发布的“AIR应用 调用摄像头拍照并保持照片到本地文件夹”结合加socket可实现一台电脑拍照,另一台电脑显示拍得的照片。
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template