当前位置: 首页>>代码示例>>PHP>>正文


PHP http::getHostFromURL方法代码示例

本文整理汇总了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);
     }
 }
开发者ID:nikrou,项目名称:dotclear,代码行数:36,代码来源:class.dc.blog.php


注:本文中的http::getHostFromURL方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。