-
Recently Browsing 0 members
- No registered users viewing this page.
-
Similar Content
-
WordPress-Theme Twenty Twenty Four-customizing: how to do that - a Gutenberg special question...
By thedhubs,
- 1 answer
- 1,167 views
-
Freepik Mystic claims to be the most advanced AI image generator to date
By pradeepviswav,
- 8 replies
- 6 views
-
Microsoft invests $25 Million in open-source database startup Neon
By pradeepviswav,
- 0 replies
- 4 views
-
Samsung Galaxy S24 FE is in the works, spotted in UK carrier EE's database
By Sagar Naresh,
- samsung
- samsung galaxy
- (and 6 more)
- 0 replies
- 3 views
-
- 0 replies
- 18 views
-
Question
whitebread
I am building a web site for a friend of mine and want to store images in a MySQL database as a Base64 string. I have seen this done before (embedding images in a web page as a Base64 string). My question is: how can I write a PHP script which will allow me to upload an image and convert it to a Base 64 string? Would it be better to store it as a binary file in the database? My goal is to not have a bunch of image files sitting around in a directory because my web host doesn't allow me to have write access by PHP scripts (I only have write access by FTP), but I need a way to upload images.
Link to comment
https://www.neowin.net/forum/topic/1051181-php-storing-images-in-mysql-database-as-base64-string/Share on other sites
7 answers to this question
Recommended Posts