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


PHP Setting::getRootPath方法代码示例

本文整理汇总了PHP中Setting::getRootPath方法的典型用法代码示例。如果您正苦于以下问题:PHP Setting::getRootPath方法的具体用法?PHP Setting::getRootPath怎么用?PHP Setting::getRootPath使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Setting的用法示例。


在下文中一共展示了Setting::getRootPath方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: registerCSS

 public static function registerCSS($includeCSS)
 {
     if (is_string($includeCSS)) {
         $includeCSS = [$includeCSS];
     }
     if (!empty($includeCSS)) {
         foreach ($includeCSS as $css) {
             $path = Asset::resolveAlias($css);
             if (is_file($path . ".css")) {
                 $file = $path . ".css";
                 if (strpos($file, Setting::getRootPath()) === 0) {
                     $file = substr($file, strlen(Setting::getRootPath()));
                     $file = Yii::app()->baseUrl . $file;
                 }
                 Yii::app()->clientScript->registerCssFile($file);
                 continue;
             }
             $csspath = realpath($path);
             if (is_dir($csspath)) {
                 $path = Asset::publish($csspath);
                 $files = glob($csspath . "/*");
                 foreach ($files as $p) {
                     if (pathinfo($p, PATHINFO_EXTENSION) != "css") {
                         continue;
                     }
                     $p = str_replace($csspath, '', realpath($p));
                     Yii::app()->clientScript->registerCssFile($path . str_replace("\\", "/", $p));
                 }
             } else {
                 if (is_file($csspath)) {
                     Yii::app()->clientScript->registerCssFile(Asset::publish($csspath));
                 }
             }
         }
     }
 }
开发者ID:rizabudi,项目名称:plansys,代码行数:36,代码来源:Asset.php

示例2: getAssetPath

 public static function getAssetPath()
 {
     return Setting::getRootPath() . DIRECTORY_SEPARATOR . "assets";
 }
开发者ID:balitax,项目名称:plansys,代码行数:4,代码来源:Setting.php

示例3:

";
        $scope.modelBaseClass = "<?php 
echo ActiveRecord::baseClass($this->model);
?>
";
        $scope.lastModified = "<?php 
echo Helper::getLastModified($modelClass);
?>
";
        $scope.date = date;
        $scope.strtotime = strtotime;
        $scope.angular = angular;
        
        if (window.plansys) {
            window.plansys.rootPath = "<?php 
echo Setting::getRootPath();
?>
";
            window.plansys.baseUrl = "<?php 
echo Yii::app()->baseUrl;
?>
";
        }


        // Process Relation Error Message
        for (i in $scope.errors) {
            if ($scope.errors[i].length > 0 && angular.isObject($scope.errors[i][0])) {
                var err = [];
                var error = $scope.errors[i][0];
                if (!error.type || !error.list) continue;
开发者ID:alfhan,项目名称:plansys,代码行数:31,代码来源:FormBuilder.js.php

示例4: init

 public static function init($config)
 {
     ## we hare to make sure the error page is shown
     ## so we need to strip yii unneeded config to make sure it is running
     $config['defaultController'] = "install";
     $config['components']['errorHandler'] = ['errorAction' => 'install/default/index'];
     Installer::checkInstall();
     if (Setting::$mode == "init") {
         $url = preg_replace('/\\/?plansys\\/?$/', '', Setting::fullPath());
         if (is_file(Setting::getRootPath() . DIRECTORY_SEPARATOR . "index.php")) {
             header("Location: " . $url . "/index.php");
             die;
         }
         if (!Installer::createIndexFile()) {
             Setting::redirError("Failed to write in \"{path}\" <br/> Permission denied", ['{path}' => Setting::getRootPath() . DIRECTORY_SEPARATOR . "index.php"]);
             return $config;
         } else {
             header("Location: " . $url . "/index.php?r=install/default/index");
             die;
         }
     }
     return $config;
 }
开发者ID:reggi49,项目名称:plansys,代码行数:23,代码来源:Installer.php

示例5:

";
        $scope.lastModified = "<?php 
echo Helper::getLastModified($modelClass);
?>
";
        $scope.date = date;
        $scope.strtotime = strtotime;
        $scope.angular = angular;
        
        if (window.plansys) {
            window.plansys.rootPath = "<?php 
echo Setting::getRootPath();
?>
";
            window.plansys.repoPath = "<?php 
echo Setting::getRootPath() . DIRECTORY_SEPARATOR . Setting::get('repo.path');
?>
";
            window.plansys.baseUrl = "<?php 
echo Yii::app()->baseUrl;
?>
";
        }


        // Process Relation Error Message
        for (i in $scope.errors) {
            if ($scope.errors[i].length > 0 && angular.isObject($scope.errors[i][0])) {
                var err = [];
                var error = $scope.errors[i][0];
                if (!error.type || !error.list) continue;
开发者ID:reggi49,项目名称:plansys,代码行数:31,代码来源:FormBuilder.js.php

示例6: str_replace

";
        $scope.lastModified = "<?php 
echo Helper::getLastModified($modelClass);
?>
";
        $scope.date = date;
        $scope.strtotime = strtotime;
        $scope.angular = angular;
        
        if (window.plansys) {
            window.plansys.rootPath = '<?php 
echo str_replace("\\", "/", Setting::getRootPath());
?>
';
            window.plansys.repoPath = '<?php 
echo str_replace("\\", "/", Setting::getRootPath() . DIRECTORY_SEPARATOR . Setting::get("repo.path"));
?>
';
            window.plansys.baseUrl = "<?php 
echo Yii::app()->baseUrl;
?>
";
        }

        // Process Relation Error Message
        for (i in $scope.errors) {
            if ($scope.errors[i].length > 0 && angular.isObject($scope.errors[i][0])) {
                var err = [];
                var error = $scope.errors[i][0];
                if (!error.type || !error.list) continue;
                
开发者ID:rizabudi,项目名称:plansys,代码行数:30,代码来源:FormBuilder.js.php

示例7: __construct

 public function __construct()
 {
     if (Setting::get("repo.path") == '') {
         $path = Setting::getRootPath() . DIRECTORY_SEPARATOR . 'repo';
         Setting::set("repo.path", $path);
         $this->repoPath = Setting::get("repo.path");
     } else {
         $this->repoPath = Setting::get("repo.path");
     }
 }
开发者ID:reggi49,项目名称:plansys,代码行数:10,代码来源:RepoManager.php


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