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


PHP Vtiger_Functions::initStorageFileDirectory方法代码示例

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


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

示例1: decideFilePath

/**
 * 	This function is used to decide the File Storage Path in where we will upload the file in the server.
 * 	return string $filepath  - filepath inwhere the file should be stored in the server will be return
 */
function decideFilePath()
{
    return Vtiger_Functions::initStorageFileDirectory();
}
开发者ID:jmangarret,项目名称:vtigercrm,代码行数:8,代码来源:CommonUtils.php

示例2: _SaveAttachmentFile

 function _SaveAttachmentFile($attachid, $filename, $filecontent)
 {
     require_once 'modules/OSSMail/MailAttachmentMIME.php';
     $adb = PearDatabase::getInstance();
     $dirname = Vtiger_Functions::initStorageFileDirectory('OSSMailView');
     if (!is_dir($dirname)) {
         mkdir($dirname);
     }
     $filename = str_replace(' ', '-', $filename);
     $filename = str_replace(':', '-', $filename);
     $filename = str_replace('/', '-', $filename);
     $saveasfile = "{$dirname}{$attachid}" . "_{$filename}";
     if (!file_exists($saveasfile)) {
         $fh = fopen($saveasfile, 'wb');
         fwrite($fh, $filecontent);
         fclose($fh);
     }
     $mimetype = MailAttachmentMIME::detect($saveasfile);
     $adb->pquery("INSERT INTO vtiger_attachments SET attachmentsid=?, name=?, description=?, type=?, path=?", array($attachid, $filename, $description, $mimetype, $dirname));
     return true;
 }
开发者ID:HoererUndFlamme,项目名称:YetiForceCRM,代码行数:21,代码来源:Record.php

示例3: decideFilePath

/**
 * 	This function is used to decide the File Storage Path in where we will upload the file in the server.
 * 	return string $filepath  - filepath inwhere the file should be stored in the server will be return
 */
function decideFilePath($module = false)
{
    return Vtiger_Functions::initStorageFileDirectory($module);
}
开发者ID:Bergdahls,项目名称:YetiForceCRM,代码行数:8,代码来源:CommonUtils.php


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