Hello.
I am trying to have a php file load an image so it appears in the lURL. Such as: file.php?img=1.jpg
If anyone knows an easy solution to this, please let me know. Some sites say I have to encode it to base64, and if that is the case, how would I encode it to create an image with the above URL?
Thank you
page.php?img=...jpg <- How to place an image after a file
Moderator: General Moderators
- aceconcepts
- DevNet Resident
- Posts: 1424
- Joined: Mon Feb 06, 2006 11:26 am
- Location: London
Re: page.php?img=...jpg <- How to place an image after a file
You could send the file as seperate variables: ?filename=pic1&ext=jpg
Use explode to seperate the filname and ext by use of the fullstop:
Use explode to seperate the filname and ext by use of the fullstop:
Code: Select all
explode(".", $filename);Re: page.php?img=...jpg <- How to place an image after a file
Where are the image contents stored?digi-what wrote:Hello.
I am trying to have a php file load an image so it appears in the lURL. Such as: file.php?img=1.jpg
If anyone knows an easy solution to this, please let me know. Some sites say I have to encode it to base64, and if that is the case, how would I encode it to create an image with the above URL?
Thank you
You can have it stored in a db the php file or just read an image file and it would work. You just have to send the appropriate headers.
Re: page.php?img=...jpg <- How to place an image after a file
How would I place the image into a mysql table?
As a file blob in base64 format? All the images are jpgs, so how would I convert that properly, and then take it out of the table to read: xxx.php?img=xx.jpg?
As a file blob in base64 format? All the images are jpgs, so how would I convert that properly, and then take it out of the table to read: xxx.php?img=xx.jpg?
Re: page.php?img=...jpg <- How to place an image after a file
You must have a specific reason for wanting to store them specifically in a database.digi-what wrote:How would I place the image into a mysql table?
As a file blob in base64 format? All the images are jpgs, so how would I convert that properly, and then take it out of the table to read: xxx.php?img=xx.jpg?
You can store binary data in mysql, its called blob