public function action_submit() { $this->template->title = 'Pages » Submit'; $this->template->content = View::forge('pages/submit'); } public function action_upload() { $this->template->title = 'Pages » Upload'; $this->template->content = View::forge('pages/upload'); $config = array( 'path' => DOCROOT.DS.'files', 'randomize' => true, 'ext_whitelist' => array('img', 'jpg', 'jpeg', 'gif', 'png'), ); Upload::process($config); if (Upload::is_valid()) { Upload::save(); } }
<h3>Submit</h3> <?php echo Form::open('pages/upload'); echo Form::file('file'); echo '<br />'; echo Form::submit('submit'); echo form::close(); ?> <h1>upload</h1>
It looks like you're new here. If you want to get involved, click one of these buttons!