| |

VerySource

 Forgot password?
 Register
Search
View: 765|Reply: 3

How to make it find the browse path automatically?

[Copy link]

5

Threads

6

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

Post time: 2020-1-29 18:00:01
| Show all posts |Read mode
// Browse path
  $ conf ["Base_url"] = "http: //". $ _SERVER ["SERVER_NAME"];
This statement is not smart enough
If I put it in a subdirectory, I would change it to:
// Browse path
  $ conf ["Base_url"] = "http: //". $ _SERVER ["SERVER_NAME"]. "/ ***";
Is there a better way?
Reply

Use magic Report

0

Threads

12

Posts

12.00

Credits

Newbie

Rank: 1

Credits
12.00

 China

Post time: 2020-3-5 01:15:01
| Show all posts
print_r ($ _ SERVER)
Find it yourself
Reply

Use magic Report

0

Threads

7

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

Post time: 2020-4-3 13:00:01
| Show all posts
Write directly

$ conf ["Base_url"] = "/ xxx";
Reply

Use magic Report

0

Threads

17

Posts

17.00

Credits

Newbie

Rank: 1

Credits
17.00

 China

Post time: 2020-4-8 07:45:01
| Show all posts
What kind of function does the landlord want to achieve? ?
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list