❶ 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過濾怎麼設置
進入路由器,然後防火牆設置,那裡可以開啟過濾,可以禁止埠,可以禁止一些協議。
可以把一些網站拉入黑名單。
在策略中也有相應設置。
你可以把你不明白設置的選項截圖,可以為你解釋一下,方便你自己操作。