How to move one directory to another directory?

前端 未结 4 1533
暗喜
暗喜 2021-02-19 03:31

I have two folders

  1. myappdemo.com/VueGuides/services/iclean

  2. myappdemo.com/VueGuides/services/pics

I need to move iclea

4条回答
  •  隐瞒了意图╮
    2021-02-19 04:13

    I required a different solution in my case as I was moving a sub folders contents into the parent folder. rename wouldn't work in my instance because the path was the same.

    (For Linux based machines):

    exec('mv '.$this->useFolder.'/'.$sub_folder.'/*'.' '.$this->useFolder);

    This uses the inbuilt mv function through exec.

提交回复
热议问题