search

Home  >  Q&A  >  body text

How to access other file directories with PHP image path?

Question, there is no problem in displaying pictures in the www root directory. It is also the root directory for domain name binding.
<img src="./img/">
The path is d:/www/img

I want to skip the upper directory of www
The path is d:/wenjian/img
<img src="../wenjian/img/">

How to display pictures in this way?

扔个三星炸死你扔个三星炸死你2774 days ago811

reply all(1)I'll reply

  • 三叔

    三叔2017-06-29 10:10:02

    Looking at the tag labeled php, you should be able to access files using the back-end method, but the front-end certainly cannot. If you can bypass the root directory of the network service to access the underlying file system, how can the server be secure? Open a web console on the front end and go to the default password storage location of the system...

    reply
    0
  • Cancelreply