0
<?php
$string = "http://giphy.com/static/img/homepage_banners/snl-leslie.gif";
$find_images = preg_match("/(https?:\/\/\S+\.(?:jpg|png|jpeg|gif))\s+/", $string, $matches) ? $matches[1] : "";
if(@is_array(getimagesize($find_images))) {
// Check if image exists
echo $find_images;
}
?>
我尝试echo图像链接,但我的正则表达式找不到图像的链接。 ???有人能帮我吗?在此先感谢PHP:从STRING获取真实图像路径
太谢谢你了。 –
@ErollKrasniqi欢迎您:) – nu11p01n73R