全省快速服務,舊屋翻修、廠房拆除等大小工程
價格透明線上可查,事後清運還原
台北居家清潔推薦NO1搬家公司,免費紙箱,服務不打烊
打包家當不煩惱,落地不加價,歡迎來電預約估價

首頁  •  j2h 論壇 • 程式設計討論     • 

php切割網域

房東:小優
發表時間:2007-03-17



$subdomain="yourStr.yourDomain.com";
$str_explode=explode(".", $subdomain);
$str_leng=strlen($str_explode['0']);
$str_subdomain=substr($subdomain, 0, $str_leng);
echo("網域前面的字串是:" .$str_subdomain. "
");

$str_domain=substr($subdomain, $str_leng+1);
echo("妳的網域名稱是:" .$str_domain);

?>



  • 贊助網站       

    廣利不動產-板橋在地生根最實在--新板特區指名度最高、值得您信賴的好房仲
    完整房訊,房屋、店面熱門精選物件,廣利不動產 優質仲介,房屋租賃、買賣資訊透明,交易真安心!
    廣利不動產-新板特區指名度最高、值得您信賴的好房仲
    您的托付,廣利用心為您服務

  • 1 樓住戶:鳥鳥
    發表時間:2007-03-18

    $test = 'test.yahoo.com.tw';
    echo substr($test,0,strpos($test,'.'));



     共 1 人回應  選擇頁數 【第1 頁】 

    姓名:
    佈告內容:
    其他選項: