A
Anonymous
Guest
I already tried to ask this in the php forums but got no response so I figured someone would know the answer here.
I am trying to write a script that takes a username (corresponding with a user on the server) and then reads the appropriate /var/mail file for that user and prints it.
I've already tried something like
but it returns a blank page with only a "4" printed.
I am not sure if the problem is the code, permissions, or what.
Thanks.
I am trying to write a script that takes a username (corresponding with a user on the server) and then reads the appropriate /var/mail file for that user and prints it.
I've already tried something like
Code:
1.
2. <?php
3. $username = $_POST["username"];
4. $output = shell_exec("cat /var/mail/$username");
5. echo $output;
6. ?>
7.
I am not sure if the problem is the code, permissions, or what.
Thanks.