8 lines
347 B
Plaintext
8 lines
347 B
Plaintext
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));
|
|
} |