you can try this, i hope that's what exactly you need
<!DOCTYPE html>
<html lang="de">
<head>
<style> @page {size: 793px 1122px;margin: 0px;padding: 0px;}
* { box-sizing: border-box; }
body {margin: 0;}
#iht9{left:149px;top:214px;position:absolute;}
#i1tz{left:149px;top:116px;position:absolute;}
#ivrl{left:155.5px;top:149px;position:absolute;}
</style>
</head>
<body>
<h2 id="iht9">Line1</h2>
<h2 id="ivrl">Line2</h2>
<h2 id="i1tz">Line3</h2>
</body>
</html>
<?php
//$filename=$_GET['file_name']; // To get the file name from URL
$filename='test.php'; // file name is stored
$fd = fopen ($filename, "r"); // opening the file in read mode
$contents = fread ($fd, filesize($filename)); // reading the content of the file
fclose ($fd); // closing the file pointer
$search=array("Line1","Line2","Line3");
$replace=array("Newline -> (1)","Newline -> (2)","Newline -> (3)");
$contents=str_replace($search,$replace,$contents);
$fd = fopen ($filename, "w"); // opening the file in write mode
//echo $contents; // printing the file content of the file
fwrite ($fd,$contents); // entering data to the file
chmod($filename,0777); // Setting the write permission
fclose ($fd); // closing the file pointer
echo ("all done refresh the page now to see result.")
?>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…