Created
December 13, 2014 11:43
-
-
Save Tjoosten/8728879e4c25b9521f38 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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
commented
Dec 13, 2014
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!';
}
}
}
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