Code:
$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>';
If run in localhost => $size[0] ok - Run in server hostinger => $size[0] NULL
Ps: allow_url_fopen is ON (check by: phpinfo(); Tks help@
Its because of the directory. The
is the path for the HTML Wrapper. But PHP looks in the physical directory of the server (similar to your C:/xampp/htdocs/my_projects/st.quantrimang.com/photos ... on your Home-PC) On localhost both are (normally) the same. On live server the structure of the directory is more complex, because every customer has its own sub-directory. In the path to your physical directory on the live server are your accountnumber (and other things) also included. In short words: use
to get the server-root of your domain. Then
should work.
Btw: 'allow_url_fopen' is not relevant in this case.