Jump to content

Server configuration: fwrite limited by default to 3 or 4 characters?


Perfidus

Recommended Posts

In my server, fwrite only works if I set an amount:

fwrite($handle, $somecontent, '10000') //This works as long as the text is < 10000
fwrite($handle, $somecontent) //This only writes 3 or 4 characters.

I have also problems with image uploading, the uploading process stops after some KB have been uploaded and they are not really much...

Sorry, I don't understand you.

This is how my code looks, the fopen has nothing special on it, does it?

Can you explain it to me?

This code comes from the PHP manual ...

	if (is_writable($filename)) 
{	
	if (!$handle = fopen($filename, 'w')) {
		 echo "Impossible to edit";
		 exit;
	}
	if (fwrite($handle, $somecontent, '10000') === FALSE) {
		echo "Can't update file";
		exit;
	}	
	echo "file was updated";	
	fclose($handle);	
} 
else 
{
	echo "Problem writing to file";
}

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.