Get the App
SLTechnology News&Howtos  ›  Development  › 

How does php remove part of a path

Shulou Source: shulou.com Published: 2022-06-03 19:32:25 10月05日 Update

This article mainly explains "how php removes a part of the path". The content of the explanation is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "how php removes part of the path".

This article operating environment: windows7 system, PHP7.1 version, DELL G3 computer

With problem description:

For example, I have a localhost/thesis/img/, that wants users to see only the paths in the img, but access to localhost/thesis and other paths will be forbidden. What should I do? Do I have to use ftp to do this?

Solution:

Use the .htaccess file.

Apache opens the htaccess file AllowOverride All

Then put an .htaccess file in the thesis directory with the content Options-Indexes

Thank you for your reading, the above is the content of "how to remove part of the path of php". After the study of this article, I believe you have a deeper understanding of how to remove part of the path of php, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Tags: Paths contents files learning problems problems methods that is ideas situations articles more for example environment users computers directories knowledge knowledge points articles Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Xiaomi vpn Huawei Redmi Microsoft