當前位置: 首頁>>代碼示例>>PHP>>正文


PHP path::fullFromRoot方法代碼示例

本文整理匯總了PHP中path::fullFromRoot方法的典型用法代碼示例。如果您正苦於以下問題:PHP path::fullFromRoot方法的具體用法?PHP path::fullFromRoot怎麽用?PHP path::fullFromRoot使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在path的用法示例。


在下文中一共展示了path::fullFromRoot方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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

示例2: __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 = preg_replace('|^([a-z]{3,}://)(.*?)/.*$|', '$1$2', $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->themes_path, DC_ROOT);
         $this->public_path = path::fullFromRoot($this->settings->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:HackerMajor,項目名稱:root,代碼行數:36,代碼來源:class.dc.blog.php

示例3: loadStyle

 public static function loadStyle($load_style_widget = false)
 {
     global $core;
     $current_theme = tplMenu::getTheme();
     $config = path::fullFromRoot($core->blog->settings->system->themes_path . '/' . $current_theme, DC_ROOT) . '/menu.' . $current_theme . '.php';
     if (!file_exists($config)) {
         $config = dirname(__FILE__) . '/themes-config/menu.' . $current_theme . '.php';
     }
     if (file_exists($config)) {
         require $config;
         if ($load_style_widget == false && isset($template_theme_style)) {
             foreach ($template_theme_style as $k => $v) {
                 define($k, $v);
             }
         } elseif (isset($widget_theme_style)) {
             foreach ($widget_theme_style as $k => $v) {
                 define($k, $v);
             }
         }
     }
     return;
 }
開發者ID:mrbidon,項目名稱:menu,代碼行數:22,代碼來源:_public.php

示例4: unzip

 private function unzip($file)
 {
     $zip = new fileUnzip($file);
     if ($zip->isEmpty()) {
         $zip->close();
         return false;
         //throw new Exception(__('File is empty or not a compressed file.'));
     }
     foreach ($zip->getFilesList() as $zip_file) {
         # Check zipped file name
         if (substr($zip_file, -4) != '.txt') {
             continue;
         }
         # Check zipped file contents
         $content = $zip->unzip($zip_file);
         if (strpos($content, '///DOTCLEAR|') !== 0) {
             unset($content);
             continue;
         }
         $target = path::fullFromRoot($zip_file, dirname($file));
         # Check existing files with same name
         if (file_exists($target)) {
             $zip->close();
             unset($content);
             throw new Exception(__('Another file with same name exists.'));
         }
         # Extract backup content
         if (file_put_contents($target, $content) === false) {
             $zip->close();
             unset($content);
             throw new Exception(__('Failed to extract backup file.'));
         }
         $zip->close();
         unset($content);
         # Return extracted file name
         return $target;
     }
     $zip->close();
     throw new Exception(__('No backup in compressed file.'));
 }
開發者ID:nikrou,項目名稱:dotclear,代碼行數:40,代碼來源:class.dc.import.flat.php


注:本文中的path::fullFromRoot方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。