I just made a file upload code and I was wondering why the file upload wasn\'t working. I changed the upload dir to 0777. This is my upload HTML code:
Your
if (file_exists("/files/".$_FILES["file"]["name"]))
will always return false. The file is saved with its temp name.
Try
if (is_uploaded_file($_FILES["file"]["tmp_name"]))
instead.
move_uploaded_file($_FILES["file"]["tmp_name"],"filebro/".$_FILES["file"]["name"]);