PHPDiscussion related to PHP web development, PHP coding. Tutorials, source code, tips and tricks related to PHP programming.
The thread "Need help turning a IMAGE upload script into a File uploader" has not received any replies for a month. It has been automatically closed as a result. You may start a new thread on the topic if the information in this thread is not sufficient.
Need help turning a IMAGE upload script into a File uploader
Hi here is the part of the code i am having issues with i found the script some where in google and their website is down ever since last week so since this website is full of coders and webmasters i was wondering if anyone can help me edit the following because every time i do it, it keeps giving me a error saying "That file type is not acceptable" Code: --------- if(($HTTP_POST_FILES['userfile']['type']=="image/gif") || ($HTTP_POST_FILES['userfile']['type']=="image/pjpeg") || ($HTTP_POST_FILES['userfile']['type']=="image/jpeg") || ($HTTP_POST_FILES['userfile']['type']=="image/jpg") || ($HTTP_POST_FILES['userfile']['type']=="image/jpg") || ($HTTP_POST_FILES['userfile']['type']=="image/bmp") || ($HTTP_POST_FILES['userfile']['type']=="image/JPEG") || ($HTTP_POST_FILES['userfile']['type']=="image/png")) { if (file_exists("./".$path . $HTTP_POST_FILES['userfile']['name'])) { echo "File name exists please rename then try again.
\n"; exit; } $zufall = rand(1,99999); $fupl = "$zufall"; $res = copy($HTTP_POST_FILES['userfile']['tmp_name'], "./" .$path .$fupl .$HTTP_POST_FILES['userfile']['name']); if (!$res) { echo "Upload Failed, please try again
\n"; exit; } else { --------- Here are the file types i want to add to the upload script * .SWF * .ZIP * .RAR here is what i added to teh file types allowed list and, tryped and got the error after uploading a file type listed above Code: --------- ($HTTP_POST_FILES['userfile']['type']=="image/swf") || ($HTTP_POST_FILES['userfile']['type']=="image/zip") || ($HTTP_POST_FILES['userfile']['type']=="image/rar") || --------- try number two Code: --------- ($HTTP_POST_FILES['userfile']['type']=="swf") || ($HTTP_POST_FILES['userfile']['type']=="zip") || ($HTTP_POST_FILES['userfile']['type']=="rar") || --------- Code: --------- ($HTTP_POST_FILES['userfile']['type']=="file/swf") || ($HTTP_POST_FILES['userfile']['type']=="file/zip") || ($HTTP_POST_FILES['userfile']['type']=="file/rar") || --------- can anyone help me with this the most important file type is "SWF" here to me if you know how to please help me out To view links or images in this forum your post count must be 1 or greater. You currently have 0 posts.
To view links or images in this forum your post count must be 1 or greater. You currently have 0 posts.
__________________ █ High Quality To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
█ Powerful To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
█ To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
The thread "Need help turning a IMAGE upload script into a File uploader" has not received any replies for a month. It has been automatically closed as a result. You may start a new thread on the topic if the information in this thread is not sufficient.