Jump to content

[SOLVED] fwrite()


The Little Guy

Recommended Posts

Why isn't this writing to the file?

 

<?php
$vals = '../includes/values.php';
fopen($vals,"w");
$write = 'this is what will be in the file.';
if (is_writable($vals)) {
if(fwrite($vals, $write)){
	echo 'Saved!';
}else{
	echo 'Not Saved!';
}
}else{
echo 'Can\'t write to file';
}
?>

 

Warning: fwrite(): supplied argument is not a valid stream resource in /home/.marble/ryannaddy/iconnect.publicsize.com/vamp/testScripts/ShopingCart/process/install.php on line 76

 

if(fwrite($vals, $write)){

 

Link to comment
https://forums.phpfreaks.com/topic/69748-solved-fwrite/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.