file_put_contents NOT working using LAMP (ubuntu 10.10)
Posted: Fri Apr 15, 2011 2:54 am
hello guys..I dont know whether this is right place to post this question. I recently installed LAMP on my ubuntu 10.10 (which is fine) and tried to write a simple php program which writes hello world in it. Then I placed this file in /var/www and using firefox ran the code. Here is what it looks like
But this shows error ..."Unable to open file". Whats the problem with code or any configuration that I am missing.
Code: Select all
<?php
file_put_contents('home/muze/Example.txt','This is in file.') or die('Unable to open file');
?>