当前位置:网站首页>PHP page Jump mode
PHP page Jump mode
2022-07-24 20:26:00 【Yu Lei [xingshuo century]】
The first way :header()
header() The main function is to HTTP Protocol header (header) Output to browser .
grammar :
void header ( string $string [, bool $replace = true [, int $http_response_code ]] )
Optional parameters replace Indicate whether to replace the previous similar header or add a header of the same type , The default is replace .
The second optional parameter http_response_code Force will HTTP The corresponding code is set to the specified value . header Function Location The header of type is a special header call , Commonly used to achieve page Jump . Be careful :1.location and “:” No spaces between numbers , Otherwise, they won't jump .
give an example :
1 2 3 4 5 6 7 |
|
Be careful :
- header No output before execution
- location and : There must be no space between them
- header After php The code also executes , So pay attention to the use exit;
The second way :meta label
Meta The label is HTML The label responsible for providing document meta information in , stay PHP Use this label in the program , You can also realize page Jump . If defined http-equiv by refresh, The page will be opened according to content The specified value jumps to the corresponding page within a certain time .
1 2 3 |
|
The third way :javascript
By using windows.location.href=‘url’; Is the page automatically jump to the new address
1 2 3 4 5 6 7 |
|
边栏推荐
- Apache atlas version 2.2 installation
- PD user manual
- Please ask a question. Follow the quick start method. After creating the table, the Flink SQL queries and displays the table structure, but there is an error when it exceeds the limit. What should we
- The difference between token and session, this classic interview question deserves a more in-depth answer
- Write a batch and start redis
- Istio II traffic hijacking process
- Actual measurement of Qunhui 71000 Gigabit Network
- OpenGL (1) vertex buffer
- Leetcode 300 longest increasing subsequence (greedy + binary search for the first element subscript smaller than nums[i]), leetcode 200 island number (deep search), leetcode 494 target sum (DFS backtr
- API data interface of A-share transaction data
猜你喜欢

Machine learning job interview summary: five key points that resume should pay attention to

从码农转型大音乐家,你只差这些音乐处理工具

VLAN Technology

147 set whether to cache by using the routing meta information - use of include and exclude - use of activated and deactivated

Lunch break train & problem thinking: thinking about the problem of converting the string formed by hour: minute: second to second

API data interface of A-share transaction data

147-利用路由元信息设置是否缓存——include和exclude使用——activated和deactivated的使用

Login Huawei device in SSH mode
![[leetcode] 1184. Distance between bus stops](/img/8c/c396e6f614f465bc09b0653540a1c8.png)
[leetcode] 1184. Distance between bus stops

Software testing interview tips | if you don't receive the offer, I'll wash my hair upside down
随机推荐
Vscode connected to the remote server cannot format the code / document (resolved)
"Hualiu is the top stream"? Share your idea of yyds
Redis basic knowledge, application scenarios, cluster installation
[training Day6] triangle [mathematics] [violence]
Is the incremental update of SQL Server database identified according to the where clause? Can't do stream update? Each table should
What should Ali pay attention to during the interview? Personal account of Alibaba interns who passed five rounds of interviews
Get the current time in go language, and the simple implementation of MD5, HMAC, SHA1 algorithms
[training Day10] silly [simulation] [greed]
A circle is displayed and can be moved
Oracle 19C datagruad replication standby rman-05535 ora-01275
English translation Chinese common dirty words
API data interface for historical data of A-share index
Working principle of envy of istio I
Hook 32-bit function using the method modified to JMP instruction
The U.S. economy continues to be weak, and Microsoft has frozen recruitment: the cloud business and security software departments have become the hardest hit
Istio一之Envoy工作原理
Modulenotfounderror: no module named 'pysat.solvers' (resolved)
[training Day6] dream [priority queue] [greed]
Applet wonderful bug update~
Valdo2021 - vascular space segmentation in vascular disease detection challenge (3)