Copy code The code is as follows:
$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);
?>
Combined with the "AIR application calls the camera to take pictures and saves the photos to the local folder" released on this site Socket allows one computer to take photos and another computer to display the photos taken.
http://www.bkjia.com/PHPjc/326965.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/326965.htmlTechArticleCopy the code as follows: ?php $dir="upload/"; $dir_res=opendir($dir); $fileFormat=array(0=".jpg",1=".gif",2=".png",3=".bmp"); $xmlData = ""; $xmlData .= "photosn"; while( $filen=...