Thread: php fopen function problem
i have problem php fopen() function on ubuntu..
html code:<html> <head> <title>file encrypt</title> </head> <body> choose file<br> <form action="submit.php" method="post"><br> type (or select) filename: <input type="file" name="unencrypted"> <input type="submit" value="encrypt"> </form> </body> </html>when try run it, error message :php code:
<?php
include 'gpg.php';
$fileloc = $_post["unencrypted"];
$fh = fopen($fileloc, "r");
$text = $fileloc;
?>
warning: fopen(hehe.txt) [function.fopen]: failed open stream: no such file or directory in /var/www/enkripsi/submit.php on line 4
have chmod /home/user/ , /var/www/ folder 777.
open_basedir disabled..
when try php code on windows platform, runs fine. wrong?
i can not test code on machine, guess:
rights have on file hehe.txt?
Forum The Ubuntu Forum Community Ubuntu Official Flavours Support General Help [ubuntu] php fopen function problem
Ubuntu
Comments
Post a Comment