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
https://forums.phpfreaks.com/topic/107749-solved-writing-a-file/
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.