• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1147
  • Last Modified:

PHP Undefined function error

Hi, I am trying to update a php file through another php file but am receiving the following error:

Fatal error: Call to undefined function file_put_content() in c:\Inetpub\wwwroot\putcontent.php on line 5

My code below:
[Putcontent.php]
 
<?
$my_file = "some_file.php";
$f_content = file_get_contents($my_file);
$string_data = "Lorem ipsum";
file_put_content($fh, $string_data);
?>
 
[some_file.php]
<html >
<head>
</head>
<body>
<div id="my_div">
<?=$string_data?>
</div>
</body>
</html>

Open in new window

0
Rassac
Asked:
Rassac
1 Solution
 
hieloCommented:
you missed an "s"

file_put_contents
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now