Skip to main content

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>
php code:
 <?php 
include 'gpg.php'
$fileloc $_post["unencrypted"]; 
$fh fopen($fileloc"r"); 
$text $fileloc
?>
when try run it, error message :
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

Popular posts from this blog

DHT11 Time out error using v0.4.1library

Sketch upload fails with Java error (___REMOVE___/bin/avrdude)!

Arduino Uno + KTY81/210 temperature sensor