php - Using Copy Directory Helper in Codeigniter to copy and move files -
i using copy directory helper addon directory helper me copy files different places on web server.
it works if files copying , folder copying located within codeigniter install directory.
i have codeigniter installation in subdirectory (http://domain.com/site) , able move , copy directories in root directory.
directory_copy('./user_guide/', './test_copy/');
creates test_copy , copies contents of user_guide it.
however doing (notice missing dot( . ) in destination directory)
directory_copy('./user_guide/', '/test_copy/');
causes
a php error encountered severity: warning message: mkdir() [function.mkdir]: permission denied filename: helpers/directory_helper.php line number: 91 php error encountered severity: warning message: mkdir() [function.mkdir]: no such file or directory filename: helpers/directory_helper.php line number: 91 php error encountered severity: warning message: copy(/test_copy/helpers/cookie_helper.html) [function.copy]: failed open stream: no such file or directory filename: helpers/directory_helper.php line number: 99 php error encountered severity: warning message: copy(/test_copy/helpers/string_helper.html) [function.copy]: failed open stream: no such file or directory filename: helpers/directory_helper.php line number: 99
...etc each file in directory.
i have checked permissions , seem fine. seems script can’t execute outside of ci installation.
all or advice appreciated
thanks,
tim
without .
(dot) refer server root /
,
require root user permission adding new folder.
user running apache not have enough permission in case.
simply copy folder apache user able access , has write permission.
Comments
Post a Comment