本文整理匯總了PHP中http::getHostFromURL方法的典型用法代碼示例。如果您正苦於以下問題:PHP http::getHostFromURL方法的具體用法?PHP http::getHostFromURL怎麽用?PHP http::getHostFromURL使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類http
的用法示例。
在下文中一共展示了http::getHostFromURL方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: __construct
/**
Inits dcBlog object
@param core <b>dcCore</b> Dotclear core reference
@param id <b>string</b> Blog ID
*/
public function __construct($core, $id)
{
$this->con =& $core->con;
$this->prefix = $core->prefix;
$this->core =& $core;
if (($b = $this->core->getBlog($id)) !== false) {
$this->id = $id;
$this->uid = $b->blog_uid;
$this->name = $b->blog_name;
$this->desc = $b->blog_desc;
$this->url = $b->blog_url;
$this->host = http::getHostFromURL($this->url);
$this->creadt = strtotime($b->blog_creadt);
$this->upddt = strtotime($b->blog_upddt);
$this->status = $b->blog_status;
$this->settings = new dcSettings($this->core, $this->id);
$this->themes_path = path::fullFromRoot($this->settings->system->themes_path, DC_ROOT);
$this->public_path = path::fullFromRoot($this->settings->system->public_path, DC_ROOT);
$this->post_status['-2'] = __('Pending');
$this->post_status['-1'] = __('Scheduled');
$this->post_status['0'] = __('Unpublished');
$this->post_status['1'] = __('Published');
$this->comment_status['-2'] = __('Junk');
$this->comment_status['-1'] = __('Pending');
$this->comment_status['0'] = __('Unpublished');
$this->comment_status['1'] = __('Published');
# --BEHAVIOR-- coreBlogConstruct
$this->core->callBehavior('coreBlogConstruct', $this);
}
}