Jump to content

Uploading a blob over the internet


neogemima

Recommended Posts

So I have a site hosted on godaddy that allows users to post different things (i.e. news, lab equipment classifieds, etc.)

 

I would like my users to be able to upload three images with their classified post, but I keep getting the error that my $file_get_contents function is failing because the string is broken.  In other words, the path to the file is invalid because the server trying to follow it is across the internet.

 

How can I get around this?  Effectively, how can I upload a blob over the internet?

Link to comment
https://forums.phpfreaks.com/topic/155383-uploading-a-blob-over-the-internet/
Share on other sites

You can just use a standard input type=file field, when the form is posted the data should be available in the $_FILES array. You can then either move it to somewhere on your filesystem or read the contents with file_get_contents and insert it into the database.

 

Post if you need more detail on any of those steps.

Archived

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

×
×
  • Create New...

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.