Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8254631
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T01:15:23+00:00 2026-06-08T01:15:23+00:00

I managed to display image on browser but I cannot save it using imagejpeg

  • 0

I managed to display image on browser but I cannot save it using imagejpeg (I don’t see any image saved in the server). I have been trying for hours and also tested out the folder by using is_writable as mentioned in this post asked by someone else PHP imagejpeg save file doesn't work .
But it still doesn’t work and on chrome, I don’t see any error except broken image icon but on IE, it shows error like this
“Warning: imagejpeg() [function.imagejpeg]: Unable to open” the file is not writable

Here is my code.

header('Content-type: image/jpeg');
$filename = 'little.jpg';
 $im = imagecreatefromjpeg($filename); 
imagefilter($im, IMG_FILTER_CONTRAST,$_POST["amount"]);

imagejpeg($im,"test.jpg");   

imagedestroy($im); 

if (is_writable('test.jpg')) {
    echo 'The file is writable';
} else {
    echo 'The file is not writable';
}

Anyone can help,please? thank you.
P.S: I also want to display the image on the browser and save the image at the same time. Is imagejpeg able to do it? If not, is there better way to do it? Thank you.

Edit: When I checked whether my folder is writable, it echoed ‘the file is writable’ but when I checked whether test.jpg is writable, it echoed ‘the file is not writable’.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T01:15:26+00:00Added an answer on June 8, 2026 at 1:15 am

    That error indicates that your PHP script does not have permission to write to that location on the server. Use your FTP software to CHMOD (change permissions) to allow write to the directory you are trying to store these in. That should do it unless your webhost has disabled PHP from writing files locally at all (in which case, you should talk to them and see what options are available).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So far i have managed to display the contents of a row(4 columns) in
Using C++/CLI, How to display a managed control (eg. System::Windows::Forms::Panel^) on a window created
I have a site that is managed with Joomla. I want to display an
I have managed to get a carousel so that when the image is changed
I have a background image that I would like to display on top of
I'm trying to make a simple image browser for TinyMCE which I am using
I've managed to get one stock table to display in the cart page when
I'm trying to return my links so they display as /Area_1419.aspx/2/1. I've managed to
I have the following code: $(document).ready(function() { // Manage sidebar category display jQuery(#categories >
I managed to get the YUI calendar widget working fine. But When it displays

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.