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...

Link to comment
Share on other sites

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";
}

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.