PHP-CI- 儲存檔案

摘要:PHP-CI- 儲存檔案

參考連結

https://ellislab.com/codeigniter/user-guide/helpers/file_helper.html

$this->load->helper('file');



$data = 'Some file data';

if ( ! write_file('./path/to/file.php', $data))
{
     echo 'Unable to write the file';
}
else
{
     echo 'File written!';
}