<?php
// Windows
$fp = fopen ("%temp%\\info.txt", "w");
?>
if on UNIX try to make sure the PHP process has read/write/execute rights on target folder.
You can create a temp folder in your dir tree structure am chmod 777 it to make sure u can access it...