php dinamik Dosyası Oluşturma ile sorun

0 Cevap php

I want to create File that have Full permission dynamically, that means every change for ID of session create new file . Unfortunately I faced some problem .

Warning: fopen(test.txt) [function.fopen]: failed to open stream: Permission denied in /home/teamroom/public_html/1/3.php on line 2

Warning: fwrite(): supplied argument is not a valid stream resource in /home/teamroom/public_html/1/3.php on line 3

Warning: fclose(): supplied argument is not a valid stream resource in /home/teamroom/public_html/1/3.php on line 4

kodu:

<?php
session();
$member_Id=$_SESSION['user_id'];
if (isset($member_Id)){
$file = fopen("test.txt","x+");
fwrite($file,"test");
fclose($file);
}
?>

can you help me ? or can you tell another way to do this idea ?

0 Cevap