Foxy Forum Status

We're no longer responding to questions via our forum, but we will keep it up for historical reasons. If you can't find the answer you're looking for, please visit our knowledge base or contact us. If there's enough interest in the future, we may bring the forum back.

myFile won't write

bdogsputnikbdogsputnik Member
in Bugs & Feature Requests edited December 2007
I'm using the code provided through foxycart_inventory, and the file will not write no matter what I do. I've verified the file existed, put it in a directory with all permissions applied, no luck.

I do have cURL on my server and it was working in the past, but now, no dice.

I just get the message "can't open file" no matter what.

Any thoughts?

Here's the code
$output = "foxytest";
$myfile = "foxycart.txt";

if (file_exists($myfile)) {
    echo "The file $myfile exists \n";
} else {
    echo "The file $myfile does not exist \n";
	$spacer = "===============\n";
	$date = date("Y-m-d H:i:s") . "\n";
	$fh = fopen($myFile, 'a') or die("can't open file");
	fwrite($fh, $spacer);
	fwrite($fh, $output);
	fwrite($fh, $date);
	fwrite($fh, $spacer);
	fwrite($fh, $FoxyData_decrypted);
  • brettbrett FoxyCart Team
    What about the file path? Depending on your server settings you might need something like /home/blah/domain/www/myfile.txt
  • i removed the path info, file_exist verified that it is there
Sign In or Register to comment.