简体   繁体   English

getimagesize() 命令问题! 命令 getimagesize () 中的循环问题

[英]getimagesize () command problem! Loop promlem in command getimagesize ()

getimagesize () command in the For loop and the Foreach loop gives the same erroneous result. For 循环和 Foreach 循环中的 getimagesize() 命令给出了相同的错误结果。 I just couldn't fix it.我只是无法修复它。 What is the reason for this, how can I fix it?这是什么原因,我该如何解决? I take the picture files from the same folder, but it always just gives the last one.我从同一个文件夹中获取图片文件,但它总是只给出最后一个。 When I apply the command one by one to the pictures, there is no problem, but when I loop, why am I having problems Also the pictures are a bit big.当我将命令逐一应用于图片时,没有问题,但是当我循环时,为什么会出现问题,而且图片有点大。 If this is the case, how can I make the loop synchronize with the command?如果是这种情况,如何使循环与命令同步?

the command is as follows;命令如下;

$file = file_get_contents("sss.txt");
$files = explode("\n", $file);

foreach( $files as $Xfile ) {

list($width, $height, $type, $attr) = getimagesize('ebat_al/'.$Xfile);
echo "genislik = " . $width . "<br>";
echo "yükseklik = " . $height . "<br>";

}

/* /*

The results are always like;结果总是这样;

genislik =精灵=

yükseklik = yükseklik =

genislik =精灵=

yükseklik = yükseklik =

genislik =精灵=

yükseklik = yükseklik =

genislik =精灵=

yükseklik = yükseklik =

genislik = 5000基因= 5000

yükseklik = 5000 yükseklik = 5000

I would be glad if you could help.如果您能提供帮助,我会很高兴。

I also said I would upload it to the web server and try it and it worked fine.我还说我会将它上传到 web 服务器并尝试它,它工作正常。 but why is my wamp not working?但为什么我的 wamp 不工作? What could be the reason for this?这可能是什么原因?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM