First I want to load a view file into a variable, then I need to create a new file by writing the data to new file.ie,Like creating a copy of a view file.
$vPath = "home/muhammed/desktop/newfolder";
$ViewData=$this->load->view('test/show',TRUE);
mkdir($vPath);
write_file("$vPath/test.php", $ViewData);
But the code given is not working.