Hi,
I am trying to create a php file dynamically..
here's my code
$textcontent='<?php'.'\r\n';
$textcontent.='include("../folder1/file.php");'.'\r\n';
$textcontent.='header("Location:'.$targetpage.'")'.'\r\n';
$textcontent.='?>';
when I tried with fwrite($fh,$textcontent) I am able to write the file but instead of four lines I get a single line with \r\n.
I want the output to be
<?php
include("../folder1/file.php");
header("Location:filename");
?>
any suggestions???? I believe I am missing something ....😕