LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   URGENT:- PHP file handling help (http://www.linuxquestions.org/questions/programming-9/urgent-php-file-handling-help-913604/)

vinaypreet 11-15-2011 02:39 AM

URGENT:- PHP file handling help
 
i have to design a PHP interface on my fedora 13 using LAMP
i need to edit my SQUID.CONF file using PHP for my bandwidth manager project.

i'm unable to open or handle any file outside the HTML folder

<?php
$File = "/root/Desktop/YourFile.txt";
$Handle = fopen($File, 'w');
$Data = "Jane Doe\n";
fwrite($Handle, $Data);
$Data = "Bilbo Jones\n";
fwrite($Handle, $Data);
print "Data Written";
fclose($Handle);
?>



This simple code runs in HTML location but not on desktop....:(

acid_kewpie 11-15-2011 02:50 AM

Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.


All times are GMT -5. The time now is 08:51 AM.