cakephp2.xですが、
アップロードプラグインを使っているのですが、
データベースに名前は登録できるのですが、
サーバーのフォルダに画像がアップロードされません。
アップロードフォルダはパーミッション777にしています。
ヴュー <form action="" method="POST" enctype="multipart/form-data"> <?=$this->Form->input('img_file_name',array('type' => 'file'));?> <?=$this->Form->submit('送信');?> </form>
モデル var $actsAs = array( 'UploadPack.Upload' => array( 'img' => array( 'path' => ':webroot/img/:style:id.:extension', 'styles' => array( 'thumb' => '80x80' ) ) ) );
追記 コントローラー public $uses = array('Bottom','KoChiku','Region','Koyou'); public $helpers = array('Common','Whitehole','UploadPack.Upload'); public $components = array('Session','Cookie','Email','Common'); public function index(){ if($this->data){ if($this->Bottom->save($this->data)){ } } }
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2017/12/06 03:56
2017/12/06 03:57
2017/12/06 03:59
退会済みユーザー
2017/12/06 04:01 編集
2017/12/06 04:00
2017/12/06 04:05
2017/12/06 04:15
2017/12/06 04:18
2017/12/06 04:18
2017/12/06 04:28
2017/12/06 06:06
2017/12/06 06:20
2017/12/07 00:08
2017/12/07 00:10
2017/12/07 05:14
2017/12/07 06:28
2017/12/07 06:32
2017/12/07 06:47
2017/12/07 06:49
2017/12/07 06:50
2017/12/07 07:01
退会済みユーザー
2017/12/07 07:07
2017/12/07 07:17 編集
2017/12/07 07:28
退会済みユーザー
2017/12/07 07:38
2017/12/07 07:43 編集
2017/12/07 07:51