Possible Duplicate:
PHP write outside document root
assume i have a script in somewhere in the htdocs directory and i want this script to write files in a directory that is of the same parent as htdocs. how do i do it?
Possible Duplicate:
PHP write outside document root
assume i have a script in somewhere in the htdocs directory and i want this script to write files in a directory that is of the same parent as htdocs. how do i do it?
Your htdocs represents your docroot.
Reading from the PHP manual for the php.ini file:
doc_root
PHP's "root directory" on the server. Only used if non-empty. If PHP is configured with safe mode, no files outside this directory are served. If PHP was not compiled with FORCE_REDIRECT, you should set doc_root if you are running PHP as a CGI under any web server (other than IIS). The alternative is to use the cgi.force_redirect configuration below.
Check if you're working in safe mode. Also check the permissions for the folder you're writing to. They should allow writing for the server-user (www, www-data, whatever).
Finally, this question might be a duplicate of this one.