Cannot create file with fopen in new directory
<pre><code>$new_file=$data['url']."_files";

if(!is_dir($new_file))
mkdir ($new_file);

echo $new_file=$new_file.'\class.ticket.php';


 $ourFileHandle = fopen($new_file, 'w') or die("can't open file");

echo  fwrite($ourFileHandle, $new_data) or die('cannot write');
fclose($ourFileHandle);
</code></pre>

<p>fwrite() returns 1473</p>

<p>this does not write new file in other directory but creates file '$newfile\class.ticket.php in the same directory.</p>

<p>Can anone explain how i can put file in new directory.</p>

<p>Thanks</p>
