php - writting files to a different directory -


possible duplicate:
php write outside document root

assume have script in somewhere in htdocs directory , want script write files in directory of same parent htdocs. how do it?

your htdocs represents docroot.

reading the php manual php.ini file:

doc_root

php's "root directory" on server. used if non-empty. if php configured safe mode, no files outside directory served. if php not compiled force_redirect, should set doc_root if running php cgi under web server (other iis). alternative use cgi.force_redirect configuration below.

check if you're working in safe mode. check permissions folder you're writing to. should allow writing server-user (www, www-data, whatever).

finally, question might a duplicate of one.


Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -