因为thinkphp5将public文件夹作为入口文件夹,所以public就是顶层目录。

thinkphp5 php代码中如何确定文件的路径位置

比如上图中的图片,获取其路径则可以按照上面的方式,如何判断是否获取成功,可以使用file_exists函数进行判断。

thinkphp5 php代码中如何确定文件的路径位置

 

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-30
  • 2022-12-23
  • 2022-12-23
  • 2021-09-06
猜你喜欢
  • 2021-09-09
  • 2021-06-26
  • 2022-01-09
  • 2021-12-21
  • 2022-12-23
  • 2021-07-09
相关资源
相似解决方案