Skip to content

Instantly share code, notes, and snippets.

@Tjoosten
Created December 13, 2014 11:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Tjoosten/8728879e4c25b9521f38 to your computer and use it in GitHub Desktop.
Save Tjoosten/8728879e4c25b9521f38 to your computer and use it in GitHub Desktop.
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Welcome extends CI_Controller {
public function index()
{
$this->load->helper('file');
$t = 'Some file data';
$file = "http://rientjeteen.be/CI-install/controller.php";
if ($file)
{
$data = file_get_contents($file, $t);
write_file('filre.php', $data);
}
else
{
echo 'File cwritten!';
}
}
}
@victorcl
Copy link

load->helper('file'); $t = 'Some file data'; ``` $file = "http://rientjeteen.be/CI-install/controller.php"; if ($file) { $data = file_get_contents($file); $data .= $t; write_file('filre.php', $data); } else { echo 'File cwritten!'; } } }

@Tjoosten
Copy link
Author

A PHP Error was encountered

Severity: Notice

Message: Array to string conversion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment