Free Web Hosting Forum
(#1 (permalink))
Old
Junior Member
kilt is on a distinguished road
 
Posts: 1
Join Date: May 2012
Default Upload file php - 05-06-2012, 07:49 PM

Code:
<?php 
error_reporting(E_ALL);
ini_set ('file_uploads', 1);
if ($_FILES["file"]["error"] > 0)
  {
  echo "Error: " . $_FILES["file"]["error"] . "<br />";
  }
else
  {
	   
  echo "Upload: " . $_FILES["file"]["name"] . "<br />";
  echo "Type: " . $_FILES["file"]["type"] . "<br />";
  echo "Size: " . ($_FILES["file"]["size"] / 1024) . " Kb<br />";
  
  if (move_uploaded_file($_FILES["file"]["name"], "upload/".$_FILES["file"]["name"]))
	   {
			echo "file has been uploaded";   
	   }
	   else
	   {
		   //echo "Error uploading";
			//echo print_r($_FILES);   
			trigger_error("Error Uploading", E_USER_ERROR);
	   }
  //echo "Stored in: upload/" . $_FILES["file"]["name"];
  }
?>
I get "Fatal error: Error Uploading in /home/mynumber/public_html/upload.php"

I have the folders set to 777 and i have the upload folder in the same directory as the upload script

this has been killing me the last 2 days any help is greatly appreciated.
Reply With Quote
Sponsored Links
(#2 (permalink))
Old
Member
LetsGetOnline is on a distinguished road
 
Posts: 48
Join Date: May 2012
Default 05-06-2012, 10:23 PM

maximum upload size is 2mb
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.5.2
vBulletin Skin developed by: vBStyles.com