i am trying to build a very simple web page that uploads files to the server. I find that the files that were uploaded to the server are distorted and corrupted. I tried jpg and txt file.(php on apache on linux redhat)
************************
<?
if(!(copy($_FILES['userfile']['tmp_name'], "../upload/" . $_FILES['userfile']['name']))) die("Cannot upload files."
;
?>
************************
thanks
************************
<?
if(!(copy($_FILES['userfile']['tmp_name'], "../upload/" . $_FILES['userfile']['name']))) die("Cannot upload files."
?>
************************
thanks