thinkphp ds represents the meaning of slash/; under window, it represents backslash\ or slash/, but for compatibility, it is recommended to use slash/; the usage of ds is equivalent to "$info = $ file->move(ROOT_PATH . 'public/uploads');".
The operating environment of this tutorial: Windows 7 system, ThinkPHP version 5, Dell G3 computer.
thinkphp ds What does it mean?
Specific problem description:
What is the DS of thinkphp5 Move method?
$info = $file->move(ROOT_PATH . 'public' . DS . 'uploads'); DS seems to be dispensable. This address is in the uploads folder under public under the root directory. ..
Problem analysis and solution:
DS represents slash/
under window represents backslash\ or slash/
stands for slash / under Linux.
But for compatibility with writing, it is recommended to use slash /.
understand.
//等同于 $info = $file->move(ROOT_PATH . 'public/uploads');
Recommended learning: "thinkPHP Video Tutorial"
The above is the detailed content of thinkphp ds what does it mean. For more information, please follow other related articles on the PHP Chinese website!