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


PHP LogPagSeguro::fileLocation方法代码示例

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


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

示例1: createFile

 /**
  * Creates the log file
  * @throws Exception
  * @return boolean
  */
 public static function createFile()
 {
     if (!self::$active) {
         return false;
     }
     $defaultPath = PagSeguroLibrary::getPath();
     $defaultName = 'PagSeguro.log';
     self::$fileLocation = $defaultPath . DIRECTORY_SEPARATOR . $defaultName;
     if ($f = @fopen(self::$fileLocation, "a")) {
         fclose($f);
     } else {
         throw new Exception("Can't create log file. Permission denied. File location: " . self::$fileLocation);
     }
 }
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:19,代码来源:LogPagSeguro.class.php

示例2: createFile

 /**
  * Creates the log file
  * @throws Exception
  * @return boolean
  */
 public static function createFile()
 {
     if (!self::$active) {
         return false;
     }
     $defaultPath = PagSeguroLibrary::getPath();
     $defaultName = 'PagSeguro.log';
     self::$fileLocation = $defaultPath . DIRECTORY_SEPARATOR . $defaultName;
     try {
         $f = fopen(self::$fileLocation, "a");
         fclose($f);
     } catch (Exception $e) {
         echo $e->getMessage() . " - Can't create log file. Permission denied. File location: " . self::$fileLocation;
     }
 }
开发者ID:rborgesds,项目名称:FluxCP,代码行数:20,代码来源:LogPagSeguro.class.php

示例3: createFile

 public static function createFile($logFile = false)
 {
     if (!self::$active) {
         return false;
     }
     $defaultPath = PagSeguroLibrary::getPath();
     $defaultName = 'PagSeguro.log';
     self::$fileLocation = $logFile ? $logFile : $defaultPath . DIRECTORY_SEPARATOR . $defaultName;
     try {
         $f = fopen(self::$fileLocation, "a");
         if (!$f) {
             throw new Exception('Unable to open the input file');
         }
         fclose($f);
         return true;
     } catch (Exception $e) {
         echo $e->getMessage() . " - Can't create log file. Permission denied. File location: " . self::$fileLocation;
         return false;
     }
 }
开发者ID:caina,项目名称:pando,代码行数:20,代码来源:LogPagSeguro.class.php

示例4: createFile

 public static function createFile()
 {
     if (!self::$active) {
         return false;
     }
     $defaultPath = PagSeguroLibrary::getPath();
     $defaultName = 'PagSeguro' . mt_rand() . '.log';
     self::$fileLocation = $defaultPath . DIRECTORY_SEPARATOR . $defaultName;
     Configuration::updateValue('PAGSEGURO_LOG_FILELOCATION', "/modules/pagseguro/features/PagSeguroLibrary/" . $defaultName);
     try {
         $f = fopen(self::$fileLocation, "a");
         if (!$f) {
             throw new Exception('Unable to open the input file');
         }
         fclose($f);
         return true;
     } catch (Exception $e) {
         echo $e->getMessage() . " - Can't create log file. Permission denied. File location: " . self::$fileLocation;
         return false;
     }
 }
开发者ID:franklindias,项目名称:prestashop,代码行数:21,代码来源:LogPagSeguro.class.php


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