How to change the upload directroy in php?
I have uploaded a Image Data from iPhone app.
I decoded the image Data and tried to save the image in the file.
I'm always receiving an error message as
file href='function.file-put-contents'>function.file-put-contents]: failed
to open stream: Permission denied in.
define('UPLOAD_DIR', '/Applications/XAMPP/xamppfiles/htdocs/temp');
$data = base64_decode($Image);
$file = UPLOAD_DIR . uniqid() . '.png';
$success = file_put_contents($file, $data);
print $success ? $file : 'Unable to save the file.';
$path = $file;
No comments:
Post a Comment