1. I copy a project on the server down to local localhost/project
, originally entered this path should jump tolocalhost/project/Auth/login
The server is jumping like that, but I migrated to the local to jump to thelocalhost/Auth/login
Where is the problem? My .htaccess
files have also been configured to hideindex.php
And I entered localhost/project/Auth/login
after his public files are all not loaded, the path error, resulting in images, CSS, JS are not read. The file directory under public is basically introduced in the form of a
configuration problem
Reply content:
1. I copy a project on the server down to local localhost/project
, originally entered this path should jump tolocalhost/project/Auth/login
The server is jumping like that, but I migrated to the local to jump to thelocalhost/Auth/login
Where is the problem? My .htaccess
files have also been configured to hideindex.php
And I entered localhost/project/Auth/login
after his public files are all not loaded, the path error, resulting in images, CSS, JS are not read. The file directory under public is basically introduced in the form of a
configuration problem
/Public
Replace the __PUBLIC__
test with the
Create a virtual host or place the program in the server root directory
/
Location (not accurate) is the domain name, you are here localhost
For TP, the introduction of static files (CSS,JS, etc.) is generally used__PUBLIC__
A function is used when generating a jump/access address U
, such as:
U('/Auth/login');//路由U('Auth/login');
If the root directory structure is different after the absolute path is migrated, the resource path must not be '/public/. ', with __root__. ' /public/. '