Hostinger无法运行getimagesize localhost运行正常[关闭]

问题描述 投票:0回答:1

代码:

$urli = 'https://st.quantrimang.com/photos/image/2020/02/20/Zalo-bat-tim-quanh-day-1.jpg';
$size = getimagesize($urli);
echo $urli.'.</br>Size:';
echo $size[0].'</br>';

如果在localhost中运行=> $size[0]正常-在主机托管程序中运行=>$size[0]NULL备注:allow_url_fopen is ON(检查者:phpinfo();谢谢@@>

代码:$ urli ='https://st.quantrimang.com/photos/image/2020/02/20/Zalo-bat-tim-quanh-day-1.jpg'; $ size = getimagesize($ urli); echo $ urli。'。Size:'; echo $ size [0]。'';如果在...

php getimagesize
1个回答
0
投票

我的猜测:出于安全原因,在php.ini中未将allow_url_fopen设置为On。如果要查看当前php.ini中配置的内容,可以使用phpinfo();

© www.soinside.com 2019 - 2024. All rights reserved.