matafy
06-30-2010, 08:33 AM
I keep getting this message:
Fatal error: Call to undefined function: file_put_contents() in /home/content/m/a/t/matafy2/html/wp-content/themes/WPStore/library/includes/admin_notification_edit.php on line 17
<?php
global $wpdb;
if($_POST)
{
$subject = $_POST['subject'];
$message = $_POST['message'];
$filename = $_POST['filename'];
$file = $_POST['notification'];
if($file=='emails' || $file=='message')
{
$destinationfile = ABSPATH . "wp-content/uploads/notification/$file/$filename";
if($subject)
{
$subject = '[SUBJECT-STR]'.$subject.'[SUBJECT-END]';
}
echo $message = $subject.$message;
file_put_contents($destinationfile,$message); #-- Line 17 --#
$fp = fopen($destinationfile,'rw');
wp_redirect(get_option('siteurl').'/wp-admin/admin.php?page=notification&msg=success');
}
}
?>
I know it has to do with PHP5 and I believe I have PHP4 installed on my server, but how do I fix it?
Fatal error: Call to undefined function: file_put_contents() in /home/content/m/a/t/matafy2/html/wp-content/themes/WPStore/library/includes/admin_notification_edit.php on line 17
<?php
global $wpdb;
if($_POST)
{
$subject = $_POST['subject'];
$message = $_POST['message'];
$filename = $_POST['filename'];
$file = $_POST['notification'];
if($file=='emails' || $file=='message')
{
$destinationfile = ABSPATH . "wp-content/uploads/notification/$file/$filename";
if($subject)
{
$subject = '[SUBJECT-STR]'.$subject.'[SUBJECT-END]';
}
echo $message = $subject.$message;
file_put_contents($destinationfile,$message); #-- Line 17 --#
$fp = fopen($destinationfile,'rw');
wp_redirect(get_option('siteurl').'/wp-admin/admin.php?page=notification&msg=success');
}
}
?>
I know it has to do with PHP5 and I believe I have PHP4 installed on my server, but how do I fix it?