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


PHP Path::convertRelativeToAbsolute方法代碼示例

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


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

示例1: isRequestedUriExists

 private function isRequestedUriExists()
 {
     /** @var $request HttpRequest */
     $request = $this->getContext()->getRequest();
     $absUrl = IO\Path::convertRelativeToAbsolute($request->getRequestedPage());
     return IO\File::isFileExists($absUrl);
 }
開發者ID:k-kalashnikov,項目名稱:geekcon_new,代碼行數:7,代碼來源:httpapplication.php

示例2: renderExceptionMessage

 function renderExceptionMessage(\Exception $exception, $debug = false)
 {
     if ($debug) {
         echo ExceptionHandlerFormatter::format($exception, true);
     } else {
         $p = Main\IO\Path::convertRelativeToAbsolute("/error.php");
         if (Main\IO\File::isFileExists($p)) {
             include $p;
         } else {
             $context = Main\Application::getInstance();
             if ($context) {
                 echo Main\Localization\Loc::getMessage("eho_render_exception_message");
             } else {
                 echo "A error occurred during execution of this script. You can turn on extended error reporting in .settings.php file.";
             }
         }
     }
 }
開發者ID:Satariall,項目名稱:izurit,代碼行數:18,代碼來源:httpexceptionhandleroutput.php

示例3: transferUri

 private function transferUri($url)
 {
     $url = IO\Path::normalize($url);
     $urlTmp = trim($url, " \t\n\r\v\\/");
     if (empty($urlTmp)) {
         throw new ArgumentNullException("url");
     }
     $ext = IO\Path::getExtension($url);
     if (strtolower($ext) != "php") {
         throw new SystemException("Only php files are allowable for url rewriting");
     }
     $arUrl = explode("/", $url);
     $rootDirName = "";
     while (!empty($arUrl) && ($rootDirName = array_shift($arUrl)) === "") {
     }
     $rootDirName = strtolower(str_replace(".", "", $rootDirName));
     if (in_array($rootDirName, array("bitrix", "local", "upload"))) {
         throw new SystemException(sprintf("Can not use path '%s' for url rewriting", $url));
     }
     if (!IO\Path::validate($url)) {
         throw new SystemException(sprintf("Path '%s' is not valid", $url));
     }
     $absUrl = IO\Path::convertRelativeToAbsolute($url);
     if (!IO\File::isFileExists($absUrl)) {
         throw new SystemException(sprintf("Path '%s' is not found", $url));
     }
     $absUrlPhysical = IO\Path::convertLogicalToPhysical($absUrl);
     global $APPLICATION, $USER, $DB;
     include_once $absUrlPhysical;
     die;
 }
開發者ID:ASDAFF,項目名稱:bitrix-5,代碼行數:31,代碼來源:application.php

示例4: loadTriggers

 private static function loadTriggers($moduleId)
 {
     static $triggersCache = array();
     if (isset($triggersCache[$moduleId])) {
         return;
     }
     if (!IO\Path::validateFilename($moduleId)) {
         throw new Main\ArgumentOutOfRangeException("moduleId");
     }
     $triggersCache[$moduleId] = true;
     $path = IO\Path::convertRelativeToAbsolute("/bitrix/modules/" . $moduleId . "/option_triggers.php");
     if (!IO\File::isFileExists($path)) {
         return;
     }
     include IO\Path::convertLogicalToPhysical($path);
 }
開發者ID:k-kalashnikov,項目名稱:geekcon_new,代碼行數:16,代碼來源:option.php

示例5: searchConnectionParametersByName

 /**
  * Search connection parameters (type, host, db, login and password) by connection name
  *
  * @param string $name Connection name
  * @return array('type' => string, 'host' => string, 'db_name' => string, 'login' => string, 'password' => string, "init_command" => string, "options" => string)|null
  * @throws \Bitrix\Main\ArgumentTypeException
  * @throws \Bitrix\Main\ArgumentNullException
  */
 private function searchConnectionParametersByName($name)
 {
     if (!is_string($name)) {
         throw new \Bitrix\Main\ArgumentTypeException("name", "string");
     }
     if ($name === "") {
         throw new \Bitrix\Main\ArgumentNullException("name");
     }
     if ($name === self::DEFAULT_CONNECTION) {
         $v = \Bitrix\Main\Config\Configuration::getValue(self::DEFAULT_CONNECTION_CONFIGURATION);
         if ($v != null) {
             return $v;
         }
         $DBType = "";
         $DBHost = "";
         $DBName = "";
         $DBLogin = "";
         $DBPassword = "";
         include \Bitrix\Main\IO\Path::convertRelativeToAbsolute("/bitrix/php_interface/dbconn.php");
         return array("type" => $DBType, "host" => $DBHost, "db_name" => $DBName, "login" => $DBLogin, "password" => $DBPassword);
     }
     /* TODO: реализовать */
     return null;
 }
開發者ID:DarneoStudio,項目名稱:bitrix,代碼行數:32,代碼來源:dbconnectionpool.php

示例6: includeConfiguration

 /**
  * Reads the configuration.
  *
  * @return array
  */
 public function includeConfiguration()
 {
     if (!isset($this->options)) {
         $arHTMLPagesOptions = array();
         $configurationPath = Main\IO\Path::convertRelativeToAbsolute(Main\Application::getPersonalRoot() . "/html_pages/.config.php");
         if (file_exists($configurationPath)) {
             include $configurationPath;
         }
         $this->options = $arHTMLPagesOptions;
     }
     return $this->options;
 }
開發者ID:spas-viktor,項目名稱:books,代碼行數:17,代碼來源:statichtmlcache.php

示例7: __construct

 public function __construct($cacheKey, array $configuration, array $htmlCacheOptions)
 {
     parent::__construct($cacheKey, $configuration, $htmlCacheOptions);
     $this->cacheFile = new Main\IO\File(Main\IO\Path::convertRelativeToAbsolute(Main\Application::getPersonalRoot() . "/html_pages" . $this->cacheKey));
 }
開發者ID:rasuldev,項目名稱:torino,代碼行數:5,代碼來源:statichtmlfilestorage.php


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