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
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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.