开发者

php url_exists function for https urls

开发者 https://www.devze.com 2023-01-28 16:32 出处:网络
func开发者_开发技巧tion url_exists($url) { $return = false; $content=@file_get_contents($url, FALSE, NULL, 0, 20);
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

精彩评论

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