添加了文献和文档两种附件类型,修改了文献的保存位置

This commit is contained in:
Li Jianxuan 2012-05-17 10:06:45 +00:00
parent 6b2edc0adc
commit 74d2ca1781
2 changed files with 4 additions and 2 deletions

View File

@ -2543,7 +2543,7 @@ class AuthorController extends Zend_Controller_Action
try{
$files=new files();
$msg = $files -> upload($this->view->config->upload,$_FILES['Filedata'],'md');
$msg = $files -> upload($this->view->config->upload,$_FILES['Filedata'],'liteature');
if(empty($msg['error']))
{

View File

@ -27,7 +27,9 @@ class files{
'media' => array('swf', 'flv', 'mp3', 'wav', 'wma', 'wmv', 'mid', 'avi', 'mpg', 'asf', 'rm', 'rmvb'),
'file' => array('doc', 'docx', 'xls', 'xlsx', 'ppt', 'htm', 'html', 'txt', 'zip', 'rar', 'gz', 'bz2'),
'reviewatt'=>array('doc', 'docx', 'xls', 'xlsx', 'ppt', 'htm', 'html', 'txt', 'zip', 'rar', 'gz', 'bz2','gif', 'jpg', 'jpeg', 'png', 'bmp','pdf','odt'),
'md'=>array('doc', 'docx', 'xls', 'xlsx', 'ppt', 'htm', 'html', 'txt', 'zip', 'rar', 'gz', 'bz2','gif', 'jpg', 'jpeg', 'png', 'bmp','pdf','odt')
'md'=>array('doc', 'docx', 'xls', 'xlsx', 'ppt', 'htm', 'html', 'txt', 'zip', 'rar', 'gz', 'bz2','gif', 'jpg', 'jpeg', 'png', 'bmp','pdf','odt'),
'liteature'=>array('doc', 'docx', 'xls', 'xlsx', 'ppt', 'htm', 'html', 'txt', 'zip', 'rar', 'gz', 'bz2','gif', 'jpg', 'jpeg', 'png', 'bmp','pdf','odt'),
'document'=>array('doc', 'docx', 'xls', 'xlsx', 'ppt', 'htm', 'html', 'txt', 'zip', 'rar', 'gz', 'bz2','gif', 'jpg', 'jpeg', 'png', 'bmp','pdf','odt'),
);
//最大文件大小
$max_size = 10485760;