Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [
- 'file' => 'Atest.doc'
- ]
- [
- 'file' => [
- 'tmp_name' => '/Applications/MAMP/tmp/php/phpgBEFye',
- 'error' => (int) 0,
- 'name' => 'Atest.doc',
- 'type' => 'application/msword',
- 'size' => (int) 45056
- ]
- echo $this->Form->create($contact, ['id'=>'contact-form']);
- echo $this->Form->file('file', ['label'=> 'Cover Letter']);
- echo $this->Form->button('Send');
- echo $this->Form->end();
- <?php
- namespace AppController;
- use AppControllerAppController;
- use AppFormContactForm;
- use CakeORMTableRegistry;
- use CakeMailerEmail;
- use CakeNetworkExceptionSocketException;
- use BurzumFileStorageStorageStorageManager;
- public function index($option = 'index'){
- $contact = new ContactForm();
- if ($this->request->is('post')) {
- if ($contact->execute($this->request->getData())) {
- //debug($this->request->getData() );
- }
- }
- ///..I omitted the rest
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement