BlueFire/api/storage/a.txt

8 lines
347 B
Plaintext
Raw Normal View History

2020-02-09 07:13:33 +00:00
public function uploadFile(){
if(!file_exists('storage')) mkdir('storage');
foreach($_FILES as $file){
file_put_contents('storage/'.$file["name"], fopen($file["tmp_name"],"r"));
$filename = $file["name"];
}
return $this->load->view('json_view', array('json' => $filename));
}