💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
# Class **Phalcon\Http\Request\File**[](# "永久链接至标题") *implements*[*Phalcon\Http\Request\FileInterface*](#) Provides OO wrappers to the $_FILES superglobal ~~~ <?php class PostsController extends \Phalcon\Mvc\Controller { public function uploadAction() { //Check if the user has uploaded files if ($this->request->hasFiles() == true) { //Print the real file names and their sizes foreach ($this->request->getUploadedFiles() as $file){ echo $file->getName(), " ", $file->getSize(), "\n"; } } } } ~~~ ### Methods[](# "永久链接至标题") public **getError** () public **getKey** () public **getExtension** () public **__construct** (*unknown* $file, [*unknown* $key]) Phalcon\Http\Request\File constructor public **getSize** () Returns the file size of the uploaded file public **getName** () Returns the real name of the uploaded file public **getTempName** () Returns the temporal name of the uploaded file public **getType** () Returns the mime type reported by the browser This mime type is not completely secure, use getRealType() instead public **getRealType** () Gets the real mime type of the upload file using finfo public **isUploadedFile** () Checks whether the file has been uploaded via Post. public **moveTo** (*unknown* $destination) Moves the temporary file to a destination within the application | - [索引](# "总目录") - [下一页](# "Class Phalcon\Http\Response") | - [上一页](# "Class Phalcon\Http\Request\Exception") | - [API Indice](#) »