I'm getting the following error when trying to save an image
Unable to open '/Applications/XAMPP/xamppfiles/htdocs/profile_images/' for writing:
Is a directory in /Applications/XAMPP/xamppfiles/htdocs/user.php on line 538
This is the line of code that's giving me trouble
imagejpeg($image, "/Applications/XAMPP/xamppfiles/htdocs/profile_images/".$userid);
I'm running XAMPP on a mac and mysql.
So far I've done the following:
Any other suggestions?
Just in case I used chmod wrong, this is exactly what I typed
su root
chmod -R 777 /Applications/XAMPP/xamppfiles/htdocs/profile_images
imagejpeg needs a filename at second parameter
imagejpeg ( resource $image [, string $filename [, int $quality ]] )
You are pointing to a directory, not a filename
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.