# Freaking php problems :(

**URL:** <https://forum.kirupa.com/t/freaking-php-problems/234745>\
**Category:** Uncategorized\
**Created:** [August 5, 2007, 6:05pm UTC](https://forum.kirupa.com/t/freaking-php-problems/234745 "2007-08-05T18:05:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![chrisclick](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/chrisclick/32/1991_2.png) [@chrisclick](https://forum.kirupa.com/u/chrisclick)\
**Post date:** [August 5, 2007, 6:05pm UTC](https://forum.kirupa.com/t/freaking-php-problems/234745/1 "2007-08-05T18:05:41Z")

</div>

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
<?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

<?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?
