Nytt problem :/
PHP: (fungerar perfekt)
<?php
session_start();
if (!isset($_SESSION['sess_user'])) {
header("Location: index.php");
exit;
}
?>
<?php
$username = $_SESSION['sess_user'];
$contents = "<html><head><title>sidans titel</title></head><body>exempel test</body></html>";
$path = "user/" . $username . "/index.php";
file_put_contents($path, $contents);
?>
När jag lägger till <iframe src="file.txt"></iframe>:
<?php
session_start();
if (!isset($_SESSION['sess_user'])) {
header("Location: index.php");
exit;
}
?>
<?php
$username = $_SESSION['sess_user'];
$contents = "<html><head><title>sidans titel</title></head><body>exempel test<iframe src="file.txt"></iframe></body></html>";
$path = "user/" . $username . "/index.php";
file_put_contents($path, $contents);
?>
Kommer "Parse error: syntax error, unexpected T_STRING in /home/a7520450/public_html/setup-write.php on line 12" upp