您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

PHP 404判断 与 js 404判断

2025/5/24 21:36:22发布10次查看
php 404判断 与 js  404判断
php判断404:
$url = home_url()./wp-content/themes/twentythirteen/pic/.$result['pic']; $headers = @get_headers($url); if(strpos($headers[0],'404') ) { $url=home_url()./wp-content/themes/twentythirteen/pic/default.png; }
js判断404:
var pic_url =/wp-content/themes/twentythirteen/pic/+data[i].pic; $.ajax({ url:pic_url, error:function(xhr, error, ex){ if (xhr.status == '404') { pic_url = /wp-content/themes/twentythirteen/pic/default.png; } }, success:function(){ pic_url = pic_url; } });
js判断404,要通过ajax......
以上就介绍了php 404判断 与 js  404判断,包括了方面的内容。
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product