PHP文件上载

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了PHP文件上载相关的知识,希望对你有一定的参考价值。

Just a simple piece of code to store an uploaded file in php.
  1. $target_path = "uploads/";
  2. $target_path = $target_path . basename( $_FILES['uploadedfile']['name']);
  3.  
  4. if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) {
  5. echo "The file ". basename( $_FILES['uploadedfile']['name'])." has been uploaded";
  6. } else{
  7. echo "There was an error uploading the file, please try again!";
  8. }

以上是关于PHP文件上载的主要内容,如果未能解决你的问题,请参考以下文章

php文件上载

提高PHP文件上载限制

Php文件上载脚本

PHP文件上载

php 为图像上载创建符号链接文件

php 更改Wordpress文件上载大小限制