tcorbeil Posted March 22, 2007 Share Posted March 22, 2007 <?php rename("/tmp/tmp_file.txt", "/home/user/login/docs/my_file.txt"); ?> ... I tried modifying the above to suite my directory structure.. can't seem to get it to work.. I was, however, successful in getting this to work when not having to change directories at all... Any ideas? Thanks. T. Link to comment https://forums.phpfreaks.com/topic/43905-solved-renaming-a-file/ Share on other sites More sharing options...
trq Posted March 22, 2007 Share Posted March 22, 2007 Are you sure you have the correct permissions? Link to comment https://forums.phpfreaks.com/topic/43905-solved-renaming-a-file/#findComment-213133 Share on other sites More sharing options...
per1os Posted March 22, 2007 Share Posted March 22, 2007 Do you have write permissions in the new directory? If not thats the problem, chmod to 777. Link to comment https://forums.phpfreaks.com/topic/43905-solved-renaming-a-file/#findComment-213134 Share on other sites More sharing options...
tcorbeil Posted March 22, 2007 Author Share Posted March 22, 2007 I got it.... I wasn't going back far enough in the directory structure.. needed to start at /home/public_html/file.php where I was only starting at /public_html/file.php.. anyway, thank you for the suggestions.. my directories were set to 777.. T. Link to comment https://forums.phpfreaks.com/topic/43905-solved-renaming-a-file/#findComment-213139 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.