Hey, I am new to php. Very new started today. I am 13 so im not going to be as techincle as ypu guys can be.
This is my code
- <?php
-
$Time = time();
-
$user = isset($_REQUEST['user']) ? $_REQUEST['user'] : $time;
-
$to = isset($_REQUEST['to']) ? $_REQUEST['to'] : $time;
-
$from = isset($_REQUEST['from']) ? $_REQUEST['from'] : $time;
-
$subject = isset($_REQUEST['subject']) ? $_REQUEST['subject'] : $time;
-
$message = isset($_REQUEST['message']) ? $_REQUEST['message'] : $time;
-
$pass = isset($_REQUEST['pass']) ? $_REQUEST['pass'] : $time;
-
$date = isset($_REQUEST['date']) ? $_REQUEST['date'] : $time;
-
$Previous = fopen($user.'/'.$pass.'.txt',"r");
-
$old = fread($Previous, 5);
-
fclose($Previous);
-
$fp = fopen($user.'/'.$pass.'.txt',"wb");
-
echo('Message Send and saved to log');
-
fwrite($fp,'Date:'.$date.'<br> To:'.$to.'
-
From:'.$from.'
-
Subject:'.$subject.'
-
Message:'.$message.''.$old);
-
fclose($fp);
-
?>
this just get infromation from my program which i made in vb.net
i want it to save it to a txt file.
The problem is i keep getting this error
Warning: fopen(Ryan/4321.txt) [function.fopen]: failed to open stream: Permission denied in /home/flume/public_html/emailcentral/logtest.php on line 13
Message Send and saved to log
Warning: fwrite(): supplied argument is not a valid stream resource in /home/flume/public_html/emailcentral/logtest.php on line 15
Warning: fclose(): supplied argument is not a valid stream resource in /home/flume/public_html/emailcentral/logtest.php on line 16
I have been trying to figure these out for ages andnow its 10:12pm (i live in Aus) and i sitll got loads of maths homework.
Can anyone please help me
Thanks in advance
Mague