Ok, Im having problems with my script.
Whem i press edit it takes me to done.php and says
Fatal error: Call to undefined function: file_put_contents() in /home/designs1/public_html/myphp/admin/edit/done.php on line 9
But when i add a function
I get sent to my 404 page…
done.php code w/out function :
<?php
//defines
$text = $_POST['text'];
$name = $_POST['name'];
$bdir = "../../";
//put
file_put_contents($bdir . $name, $text);
//echo
echo "edit of {$name} was complete."
?>
done.php code w/ function:
<?php
//defines
$text = $_POST['text'];
$name = $_POST['name'];
$bdir = "../../";
//put
function file_put_contents() {
file_put_contents($bdir . $name, $text);
}
file_put_contents();
//echo
echo "edit of {$name} was complete."
?>
Whats the problem?