Jump to content

protocol (c)


funtime50

Recommended Posts

Hi,

 

I know this must be really simple but I just cant see why it isnt working.

Im uploading a file to a local apache server then inserting the path to a mysql database.

I am trying to create a link so it opens the file uploaded, but it gives me this error

 

FireFox doesnt know how to open this address because the protocol © isnt associated with any program

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/43524-protocol-c/
Share on other sites

<form enctype = "multipart/form-data" action = "s_uploadfile.php"

method = "POST">

<b>File location (or select browse):</b><br><br>

<input type = 'hidden' name = 'MAX_FILE_SZE' value '300000000'>

<input type = 'file' name = 'filename' size = "60">

<p> <input type ='submit' name = 'upload' value= 'upload'></p>

</form>

 

 

inside php tags:

 

$destination = 'c:\wamp\data'."\\".$_FILES['filename']['name'];

        echo $destination;

        move_uploaded_file ($_FILES['filename']['tmp_name'], $destination);

        echo "<br>File Uploaded<br> {$_FILES['filename']['name']}

({$_FILES['filename']['size']})";

Link to comment
https://forums.phpfreaks.com/topic/43524-protocol-c/#findComment-211396
Share on other sites

Don't use a system path when displaying the image. Use a HTML path.

 

System path:

C:/path/to/something

 

HTML path:

http://www.mysite.com/path./to/something (absolute)

OR

./path/to/something (relative)

 

It is fine using a system path for uploading the image, but not displaying it.

 

Also firefox uses the file:// protocol in order to access files off of the users file system.

Link to comment
https://forums.phpfreaks.com/topic/43524-protocol-c/#findComment-211420
Share on other sites

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.