处理文件上传和验证的PHP库.zip

时间:2022-07-31 04:00:27
【文件属性】:
文件名称:处理文件上传和验证的PHP库.zip
文件大小:32KB
文件格式:ZIP
更新时间:2022-07-31 04:00:27
类库下载-处理文件上传和验证的PHP库 <?php class FileInfoTest extends PHPUnit_Framework_TestCase {     protected $fileWithExtension;     protected $fileWithoutExtension;     public function setUp()     {         $this->fileWithExtension = new \Upload\FileInfo(dirname(__FILE__) . '/assets/foo.txt', 'foo.txt');         $this->fileWithoutExtension = new \Upload\FileInfo(dirname(__FILE__) . '/assets/foo_wo_ext', 'foo_wo_ext');     }这个库PHP的上传机制封装的很完全,他的实现流程是这样的UPLOAD到文件到临时目录中?>使用move_uploadde_file()到指定的目录这就是PHP上传流程,或者你在中途再进行一些验证。例如判断是不是通过upload方式提交的文档,或者文件的扩展是不是我们允许的
【文件预览】:
Upload-master
----.gitignore(38B)
----README.md(2KB)
----tests()
--------FileTest.php(9KB)
--------FileInfoTest.php(3KB)
--------Validation()
--------assets()
--------bootstrap.php(57B)
--------Storage()
----phpunit.xml(630B)
----LICENSE(1KB)
----composer.json(665B)
----src()
--------Upload()
----.travis.yml(284B)

网友评论