php最简单文件上传代码
我们实现最简单的文件上传功能,只要利用php自带的move_uploaded_file函数就可以方便实现.
<?php $tmp_filename = $_FILES [ 'myupload' ][ 'tmp_name' ]; if (!move_uploaded_file( $tmp_filename , "/path/to/dest/{$_FILES['myupload']['name']}" )) { echo "An error has occurred moving the uploaded file.<BR>" ; echo "Please ensure that if safe_mode is on that the " . "UID PHP is using matches the file." ; exit ; } else { echo "The file has been successfully uploaded!" ; } ?>查看更多关于php最简单文件上传代码 - php上传下载的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://haodehen.cn/did29388