Jump to content

Archived

This topic is now archived and is closed to further replies.

Nomax5

how to change the file name created using the GD lib

Recommended Posts

I want people to be able to right click images I make with php and “Save As…”

if I create a jpeg within test.php with imagejpeg(“$im);  which outputs it to the browser.
when I right click the image its called  “test.php” how do I make it called “something.jpg” instead?

I’m thinking my visitors will save it with the .php extension and get confused.
I don’t want to save it as a file if I can help it because there will be many of them.

Any ideas?

Share this post


Link to post
Share on other sites
the image would be a .jpg

For example
test.php, right click, save as
test.php.jpg

Now how to remove the .php. is a good question

Share this post


Link to post
Share on other sites
when you do "Save As..."  its just called "test" 
and you can choose type "GIF (*.gif)"  or BMP

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.