I ran into this problem: I wanna write an iframe tag into a text file using a PHP script. The writing script:
<?php
// Open the text file
$f = fopen("text.txt", "a");
// Write text
fwrite($f, $_POST["textblock"] . "\n");
// Close the text file
fclose($f);
// Redirect
header("Location: http://umaster.tk/admin/index.php");
//Error
die();
?>
The reading script:
<?php
$myfile = fopen("szoveg.txt", "r") or die("Unable to open file!");
while(!feof($myfile)) {
echo fgets($myfile);
}
fclose($myfile);
?>
The iframe:
<iframe width="560" height="315" src="https://www.youtube.com/embed/asNzJ2mFCm0" frameborder="0" allowfullscreen>
</iframe>
And what the php script wrote:
<iframe width=\"560\" height=\"315\" src=\"https://www.youtube.com/embed/asNzJ2mFCm0\" frameborder=\"0\" allowfullscreen></iframe
How can I get rid of these backslashes?