The second argument to copy() function cannot be a directory

后端 未结 7 791
温柔的废话
温柔的废话 2020-12-18 20:29

Anyone know why this:



        
相关标签:
7条回答
  • 2020-12-18 21:08

    You are specifying to move a file to a directory; neither PHP's move_uploaded_file nor its copy is as smart as a shell's copy -- you have to specify a filename, not a directory, for the destination.

    So, one simple solution would be to take the basename of the source file and append that to the destination directory.

    0 讨论(0)
提交回复
热议问题