Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $file = $_SERVER['DOCUMENT_ROOT'].'/'.$domaindir.'/test.php';
- $dbfile = "include('".$_SERVER['DOCUMENT_ROOT']."/".$domaindir."/web_".$dbname.".inc.php');";
- $file = file('yourfile.php');
- $first_line = array_shift($file); // Remove first line and save it
- array_unshift($file, $yourSecondLine); // push second line
- array_unshift($file, $first_line); // Save back the first line
- $fp = fopen('yourfile.php', 'w'); // Reopen the file
- fwrite($fp, implode("n", $file));
- fclose($fp);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement