Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. [
  2. 'file' => 'Atest.doc'
  3. ]
  4.  
  5. [
  6. 'file' => [
  7. 'tmp_name' => '/Applications/MAMP/tmp/php/phpgBEFye',
  8. 'error' => (int) 0,
  9. 'name' => 'Atest.doc',
  10. 'type' => 'application/msword',
  11. 'size' => (int) 45056
  12. ]
  13.  
  14. echo $this->Form->create($contact, ['id'=>'contact-form']);
  15. echo $this->Form->file('file', ['label'=> 'Cover Letter']);
  16. echo $this->Form->button('Send');
  17. echo $this->Form->end();
  18.  
  19. <?php
  20. namespace AppController;
  21. use AppControllerAppController;
  22. use AppFormContactForm;
  23. use CakeORMTableRegistry;
  24. use CakeMailerEmail;
  25. use CakeNetworkExceptionSocketException;
  26.  
  27. use BurzumFileStorageStorageStorageManager;
  28.  
  29. public function index($option = 'index'){
  30. $contact = new ContactForm();
  31. if ($this->request->is('post')) {
  32.  
  33.  
  34. if ($contact->execute($this->request->getData())) {
  35. //debug($this->request->getData() );
  36. }
  37. }
  38. ///..I omitted the rest
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement