Opening File in php
<p>I want to open the file in php.
But when i open a file using fopen() i got the error.
My code is given below.</p>

<pre><code>&lt;?php

chdir("/home/chintan/directory");

$fp = fopen("abc.txt","w");

if($fp == false)
{
echo "Error while opening file";
}

fwrite($fp,"Hi........");
fclose($fp);

?&gt;
</code></pre>

<p>File is exist and file/directory has writable permission
and it is giving the error that i have print using echo.
I have tried using w+ but it it giving the same result</p>
