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


PHP UploadFile::get_file_contents方法代码示例

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


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

示例1: uploadPublicFile

 /**
  * Method that extracts contents of a file and upload
  * @param string $fileName
  * @param boolean $getFileContents
  * @return type
  * @throws Exception
  * @codeCoverageIgnore
  */
 public static function uploadPublicFile($fileName, $getFileContents = true)
 {
     try {
         $sugarUploader = new UploadFile($fileName);
         if ($getFileContents) {
             return $sugarUploader->get_file_contents();
         } else {
             $sugarUploader->confirm_upload();
             $sugarUploader->final_move($fileName . '_' . create_guid());
             return array();
         }
     } catch (Exception $oException) {
         throw $oException;
     }
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:23,代码来源:PMSEEngineUtils.php

示例2: getLogFile

 /**
  * @codeCoverageIgnore
  */
 public function getLogFile($file)
 {
     //$this->bpmLog('INFO', " getting log from " . $file);
     //return file_get_contents($file);
     require_once 'include/upload_file.php';
     $_file = new UploadFile();
     //get the file location
     $_file->temp_file_location = $file;
     //alternatively you can do the following if you know the upload file id
     //$file->temp_file_location = UploadFile::get_upload_path($file_id);
     return $_file->get_file_contents();
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:15,代码来源:PMSE.php

示例3: getDataFile

 /**
  * Function to get a data for File uploaded
  * @param $file
  * @return mixed
  */
 public function getDataFile($file)
 {
     //return file_get_contents($file);
     require_once 'include/upload_file.php';
     $_file = new UploadFile();
     //get the file location
     $_file->temp_file_location = $file;
     $_data = $_file->get_file_contents();
     return $_data;
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:15,代码来源:PMSEImporter.php


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