Jump to content

Need help with writing to files..


SC__Programmer

Recommended Posts

im trying to make a program that changes some files from 0 to 1,but im having some trouble...

 

heres my code,

$id = $_GET["id"];

$file1 = "http://mysite.co.cc/users/".$id."/file1.txt";

$fh = fopen($file1, 'w');
fwrite($fh, "1");
fclose($fh);

 

I followed this tut: http://www.tizag.com/phpT/filewrite.php

 

I cant find anything wrong with the code,but it will not make the file have 1 in it.

Link to comment
https://forums.phpfreaks.com/topic/246314-need-help-with-writing-to-files/
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.