Jump to content

php safe mode and uploading images


thakerm

Recommended Posts

 

PHP v. 4.4.2

 

Hey yall,

 

I am trying to upload an image to my school server, however it is in safe mode. I am developing a webpage for a club and would like to be able to upload images using a single php script. I have searched around and want to make sure if it is even possible to upload in safe mode with PHP version 4.4.2.

 

This is the code I currently have:

$uploaddir = "upload/";

 

if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploaddir.$_FILES['userfile']['name']))

{

    echo "file uploaded";

    }

 

else

{

echo '</br>';

        echo "error!";

        echo '</br>';

        echo $_FILES['userfile']['error'];

echo '</br>';

    }

 

I have set all the right permissions to the upload folder and I know my form is right. I got the form code by searching google and referencing a php book I have.

 

By the way, the error I get when I try and upload something is 0.

 

Hope you guys can shine some light on this for me.

 

Thanks

thakerm

Link to comment
https://forums.phpfreaks.com/topic/65548-php-safe-mode-and-uploading-images/
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.