开发者

php url_exists function for https urls

func开发者_开发技巧tion url_exists($url) {
        $return = false;
        $content=@file_get_contents($url, FALSE, NULL, 0, 20);
        if($content == false ) {
            $return = false;
        } else if (count($content) 

How to modify this function to check on content on https URLS as well. This is currently not able to check existense of file there.


Remove the silence operator @ and see what error you get.


Have you tried PHPs file_exists() that supports URLs, too?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜