婷婷综合国产,91蜜桃婷婷狠狠久久综合9色 ,九九九九九精品,国产综合av

主頁(yè) > 知識(shí)庫(kù) > fckeditor php上傳文件重命名的設(shè)置

fckeditor php上傳文件重命名的設(shè)置

熱門標(biāo)簽:長(zhǎng)春銷售外呼系統(tǒng)業(yè)務(wù) 四平電話機(jī)器人哪家好 天津電銷卡外呼系統(tǒng)線路 興化400電話辦理多少錢 企業(yè)電話機(jī)器人辦理 株洲外呼營(yíng)銷系統(tǒng)有哪些 靈聲智能電話機(jī)器人招聘 長(zhǎng)春防封卡電銷卡套餐 智能電銷機(jī)器人真的好嗎
這里經(jīng)過(guò)摸索:找到了一個(gè)重命名的方法,大家看看好不好使。
首先:我希望上傳的文件根據(jù)日期來(lái)組織文件夾
請(qǐng)修改editor\editor\filemanager\connectors\php文件夾下的:config.php文件
找到如下的內(nèi)容:
// Path to user files relative to the document root.
$Config['UserFilesPath'] =
修改為:
// Path to user files relative to the document root.
$Config['UserFilesPath'] = '/uploadfiles/'.date("Ym")."/" ;
這樣上傳的文件就按照日期存放了。
其次:重命名
請(qǐng)修改該文件夾下的io.php文件
找到:
// Do a cleanup of the file name to avoid possible problems
function SanitizeFileName( $sNewFileName )
{
global $Config ;
$sNewFileName = stripslashes( $sNewFileName ) ;
// Replace dots in the name with underscores (only one dot can be there... security issue).
if ( $Config['ForceSingleExtension'] )
 $sNewFileName = preg_replace( '/\\.(?![^.]*$)/', '_', $sNewFileName ) ;
// Remove \ / | : ? * " >
$sNewFileName = preg_replace( '/\\\\|\\/|\\||\\:|\\?|\\*|"||>/', '_', $sNewFileName );
return $sNewFileName ;
}
修改為:
// Do a cleanup of the file name to avoid possible problems
function SanitizeFileName( $sNewFileName )
{
global $Config ;
$sNewFileName = stripslashes( $sNewFileName ) ;
// Replace dots in the name with underscores (only one dot can be there... security issue).
if ( $Config['ForceSingleExtension'] )
 $sNewFileName = preg_replace( '/\\.(?![^.]*$)/', '_', $sNewFileName ) ;
$sExtension = substr( $sNewFileName, ( strrpos($sNewFileName, '.') + 1 ) ) ;
$sNewFileName = my_setfilename().'.'.$sExtension;
return $sNewFileName ;
}
function my_setfilename(){
$gettime = explode(' ',microtime());
$string = 'abcdefghijklmnopgrstuvwxyz0123456789';
$rand = '';
for ($x=0;$x12;$x++)
 $rand .= substr($string,mt_rand(0,strlen($string)-1),1);
return date("ymdHis").substr($gettime[0],2,6).$rand;
}
這樣上傳的文件就可以實(shí)現(xiàn)重命名了。
您可能感興趣的文章:
  • PHP自動(dòng)重命名文件實(shí)現(xiàn)方法
  • php 隨機(jī)數(shù)的產(chǎn)生、頁(yè)面跳轉(zhuǎn)、件讀寫、文件重命名、switch語(yǔ)句
  • 6種php上傳圖片重命名的方法實(shí)例
  • 基于php上傳圖片重命名的6種解決方法的詳細(xì)介紹
  • PHP批量修改文件名稱的方法分析
  • php實(shí)現(xiàn)批量修改文件名稱的方法
  • PHP實(shí)現(xiàn)批量修改文件后綴名的方法
  • php實(shí)現(xiàn)文件編碼批量轉(zhuǎn)換
  • php中批量修改文件后綴名的函數(shù)代碼
  • php中批量替換文件名的實(shí)現(xiàn)代碼
  • PHP實(shí)現(xiàn)批量重命名某個(gè)文件夾下所有文件的方法

標(biāo)簽:貴港 黑龍江 青海 巴彥淖爾 新疆 運(yùn)城 漯河 石嘴山

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《fckeditor php上傳文件重命名的設(shè)置》,本文關(guān)鍵詞  fckeditor,php,上傳,文件,重命名,;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問(wèn)題,煩請(qǐng)?zhí)峁┫嚓P(guān)信息告之我們,我們將及時(shí)溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無(wú)關(guān)。
  • 相關(guān)文章
  • 下面列出與本文章《fckeditor php上傳文件重命名的設(shè)置》相關(guān)的同類信息!
  • 本頁(yè)收集關(guān)于fckeditor php上傳文件重命名的設(shè)置的相關(guān)信息資訊供網(wǎng)民參考!
  • 推薦文章
    主站蜘蛛池模板: 贵定县| 铅山县| 蓬安县| 密云县| 台前县| 格尔木市| 石台县| 寿光市| 安丘市| 库伦旗| 醴陵市| 天镇县| 边坝县| 乐亭县| 柳林县| 饶河县| 台州市| 闽清县| 余江县| 阳春市| 枣庄市| 安丘市| 张掖市| 池州市| 株洲市| 凤庆县| 册亨县| 花莲市| 河东区| 大港区| 伊金霍洛旗| 晴隆县| 临澧县| 桐庐县| 文山县| 庆阳市| 鄂温| 濮阳县| 海盐县| 旅游| 玉山县|