Jump to content

[SOLVED] writing a file


someguy913323

Recommended Posts

Hi.

 

I don't know what's going on here, it's really a weird issue.

 

I'm testing on a local test server, yesterday I was able to read/write files, now I'm unable to?! I haven't really fussed with the ini settings too much, I have no clue what it could be. Anyway I was sure to check if file_exists worked and it was in the proper directory, here's the code..

 

                $mfile=fopen("sometext.txt","w");

	fwrite("sometext.txt","helloworld");

	fclose($mfile);

 

Pretty basic huh?

 

Anyway it shoots out this error for some reason: supplied argument is not a valid stream resource in ...

 

Some of the ini setting go as following:

 

open_basedir =

safe_mode = Off

allow_url_fopen = On

allow_url_include = On (This one I switched to On to see if it would spark something, the rest are the default I believe)

 

Also I've tried writing to absolute files, I don't know what it could be, any thoughts?

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.