Skip to content

Commit

Permalink
路径修改
Browse files Browse the repository at this point in the history
  • Loading branch information
canzhen committed Jun 19, 2016
1 parent 3c55822 commit 0aa871e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/Http/Controllers/CpyController.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public function uploadTemplate(){
session_start();
}
$author_name = $_SESSION['userName'];
$path = app_path()."\\..\\public\\company\\template\\".$author_name.'\\';
$path = app_path()."/../public/company/template/".$author_name.'/';
if (!empty($_FILES)){
//得到上传文件的临时流
$tempFile = $_FILES['myfile']['tmp_name'];
Expand All @@ -130,7 +130,7 @@ public function uploadTemplate(){
mkdir($path,0777,true);

//往templates表中新增数据
$saving_path = "company\\template\\".$_SESSION['userName'].'\\'.$fileName;
$saving_path = "company/template/".$_SESSION['userName'].'/'.$fileName;
$response = 0;//初始化默认回复为0
if ($this->addTemplate($fileName,$author_name,$saving_path,"没有描述")){
//成功往数据库添加数据之后才把图片保存到硬盘,这样可以防止重名
Expand Down

0 comments on commit 0aa871e

Please sign in to comment.