php image upload

How to make a basic PHP uploader? I want my images to save in my htdocs/myfolder/

Here is my code:

<form enctype="multipart/form-data" method="post" action="img_uploader.php">
    <input type="file" name="fileToUpload" /><br />
    <input type="submit" value="Upload File" />
</form>

I followed this tutorial to make my first php image uploader some time ago:

File Upload Tutorial


There are full examples of how to do this on the PHP website:

http://us3.php.net/manual/en/features.file-upload.post-method.php

You're off to a good start, just look at Example #2 on that page.


Here is a quick tutorial I found for doing a file upload:

http://www.tizag.com/phpT/fileupload.php

I read through it pretty quick, but it gives you the basic idea with some safety stuff to boot

链接地址: http://www.djcxy.com/p/64856.html

上一篇: 在php中附加文件并插入数据库

下一篇: PHP图片上传