enox10mx
New Member
- Messages
- 29
- Reaction score
- 0
- Points
- 0
hello. I have a problem. my site http://eno.x10.mx/admin/edit.php/edit.php (Which is password protected, mind you.) has some php code and it returns this error:
This is the code:
May somebody tell me exactly what's wrong with this code?
Code:
[B]Parse error[/B]: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in [B]/home/enox10mx/public_html/admin/edit.php/edit.php[/B] on line [B]18[/B]
Code:
<a href="..">Home</a>
<br />
<a href="index.php">Edit/make another page</a>
<br />
<?php
$edit = "edit.php";
$filename = $_get['urltoedit']; // This is what you want to save the file as.
$content = $_post['code']; // This is the stuff that you want to put into the file.
if (empty($content)) {
$html = file_get_contents($filename');
}
else
{
file_put_contents($filename, $content);?>
}
?>
<?php
echo "<form method='post' action='edit.php'>";
echo "<textarea name='code'>$html</textarea>";
echo "<input type='submit' value='save'>";
echo "</form>";
?>