about file upload on PHP -
i have question file upload.
this html source.
<th scope="row">upload file</th> <td> <input id="file" name="file" type="file" title="lable text"> </td>
here file properties.
path : /www/temp/bulk_files
type: folder
location : ftp://anisfra@example.com//www/anisfra/www/partner/bulk_files
what use that?
also using set permissions here.
@chmod('ftp://anisfra@example.com/www/anisfra/www/partner/bulk_files', 0777);
but, doesn't work.
what missing?
<form action="" method="post" enctype="multipart/form-data"> <label for="file">filename:</label> <input type="file" name="file" id="file" /><br /> <input type="submit" name="submit" value="submit" /> </form>
after file attribute
echo "upload: " . $_files["file"]["name"] . "<br />"; echo "type: " . $_files["file"]["type"] . "<br />"; echo "size: " . ($_files["file"]["size"] / 1024) . " kb<br />"; echo "temp file: " . $_files["file"]["tmp_name"] . "<br />";
then pass atribute upload function
move_uploaded_file( $_files["file"]["tmp_name"], "upload/" . $_files["file"]["name"] ); echo "stored in: " . "upload/" . $_files["file"]["name"];
Comments
Post a Comment