資源簡介
Zend/Uri.php相關示例
代碼片段和文件信息
require_once?‘Zend/Uri.php‘; //加載Uri組件
$url1=“http://www.abc.com“; //定義URL1
$url2=“http;//aaaaaaaaaaaaa“; //定義URL2
$value1=Zend_Uri::check($url1); //對$url1進行驗證
$value2=Zend_Uri::check($url2); //對$url2進行驗證
if($value1) //判斷返回值
{
echo?‘給定的地址$url1有效‘; //輸出內容
}
else
{
echo?‘給定的地址$url1無效‘; //輸出內容
}
echo?““;
if($value2) //判斷返回值
{
echo?‘給定的地址$url2有效‘;
}
else
{
echo?‘給定的地址$url2無效‘;
}
?>
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2011-05-03?04:44??13\
?????文件?????????556??2008-02-02?21:42??13\13-1.php
?????文件?????????283??2008-02-02?22:05??13\13-2.php
?????文件?????????268??2008-02-02?22:41??13\13-3.php
?????文件?????????345??2008-02-02?22:40??13\13-4.php
評論
共有 條評論