php - adding new lines

rinderi

New Member
Hi can someone help me to solve this out... i've wrote a script which replaces some functions in other php file but now i have to add new lines to the edited script because it echo an error... the thing is that i need some kind guess the number of new lines so i need a function or a little code who adds new line when it print error here's part of my code\[code\]$make = file_get_contents($orig);$make = str_replace('?><?php','',$make);$new = "\n\n\n\n\n\n\n\n\n\n";$new2 = "\n";$new3 = "\n\n\n\n\n\n\n\n\n\n\n\n\n";$line = "?>$new2"; //add \n for new line if needed$make = str_replace("?>","$line",$make);file_put_contents($copy,$make);\[/code\]the thing is in $new and $line so i need some code to add new lines and try it if it print error the script will add new line and so on until it print normal ;) so any suggestion ?
 
Top