我一直在尝试从 url 获取图像的大小,但它不起作用。谁能帮我?
这是代码:
$imagesize = getimagesize('https://www.dropbox.com/s/hbtmge2omlyqx2n/BrownBag.jpg?dl=0');
echo $imagesize;
Run Code Online (Sandbox Code Playgroud) 我有两个数组,每个数组都是从一个字符串生成的。字符串是:
$string1 = "#574390, #574387, #574386, #574383 (keyboard enter)
#574368, #574367, #574364, #574361, #574357, #574355, #574351, #574343, #574341 (keyboard enter)
#574381, #574379, #574377, #574375, #574374, #574373, #574372, #574371, #574369"
$string2 = "574390
574386
574383
574381
574379
574377
574375
574374
574373
574372
574371
574369
574368
574367
574364
574361
574357
574355
574351
574343
574341"
Run Code Online (Sandbox Code Playgroud)
然后,我这样做是为了将每个字符串分解为数组:
$str1 = checkstring($string1);
$str2 = checkstring($string2);
function checkstring($x) {
//check whether the string has "#" in it
if (!strstr($x, '#')) {
$array1 = str_replace(" ", "", $x); …Run Code Online (Sandbox Code Playgroud)