❶ php输出如何过滤包含http值
<?php foreach ($data['items'] as $item): ?><?php if(strpos($item->pic_url,'http://')!==false)continue; ?><img src="<?php echo $item->pic_url; ?>" /><?php endforeach; ?>
❷ preg replace php中网址过滤
完全没必要用正则
直接用内置函数strip_tags可以达到你的的需求
strip_tags(string,allow)
❸ php 怎么过滤后url后面的缀名
$_GET['id']='sdfsf.5.jpg';
$new_str= strrev($str);
$new_str1=substr($new_str,strpos($new_str, ".")+1);
echo strrev($new_str1)
❹ php怎么办url中的index.php去掉
为美观一些,去掉CI默认url中的index.php。分三步操作:
1.打开apache的配置文件,conf/httpd.conf :
LoadMole rewrite_mole moles/mod_rewrite.so,把该行前的#去掉。
搜索 AllowOverride None(配置文件中有多处),看注释信息,将相关.htaccess的该行信息改为AllowOverride All。
2.在CI的根目录下,即在index.php,system的同级目录下,建立.htaccess,直接建立该文件名的不会成功,可以先建立记事本文件,另存为该名的文件即可。内容如下(CI手册上也有介绍):
RewriteEngine on
RewriteCond $1 !^(index/.php|images|robots/.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]
如果文件不是在www的根目录下,例如我的是:http://localhost/CI/index.php/,第三行需要改写为RewriteRule ^(.*)$ /CI/index.php/$1 [L]。
另外,我的index.php的同级目录下还有js文件夹和css文件夹,这些需要过滤除去,第二行需要改写为:RewriteCond $1 !^(index/.php|images|js|css|robots/.txt)。
3.将CI中配置文件(system/application/config/config.php)中$config['index_page'] = "index.php";将$config['index_page'] = ""; 。
ok,完成。还要记得重启apache。
❺ tplink路由器url过滤怎么设置
进入路由器,然后防火墙设置,那里可以开启过滤,可以禁止端口,可以禁止一些协议。
可以把一些网站拉入黑名单。
在策略中也有相应设置。
你可以把你不明白设置的选项截图,可以为你解释一下,方便你自己操作。