CakePHP-2.0, how can i upload an image for user profile? [closed]
-
30-05-2021 - |
Question
I have used CakeDC users plugin. I need to upload/add a profile picture for an user.
How can i do this?
Can anyone post the code to have upload image?
http://book.cakephp.org/2.0/en/core-libraries/helpers/form.html
I added this but i got only a button.
echo $this->Form->create('Document', array('enctype' => 'multipart/form-data'));
echo $this->Form->file('Document.submittedfile');
echo $this->Form-end();
How can i set/get the path of uploaded file?
Solution
No matter the framework you use, this will works to PHP.
http://www.w3schools.com/php/php_file_upload.asp
PD: I suggest that next time, try to be more specific in your questions.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow