Skip to content

Instantly share code, notes, and snippets.

@Tjoosten
Created December 13, 2014 11:43
Show Gist options
  • 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!';
}
}
}
@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