";" statement."/> ";" statement.">
search
HomeBackend DevelopmentPHP ProblemHow to achieve page jump in 3 seconds in php

How to achieve page jump in 3 seconds in php: 1. Use the "header('Refresh:3,Url=page address')" statement; 2. Use "echo "";" statement.

How to achieve page jump in 3 seconds in php

The operating environment of this tutorial: windows7 system, PHP7.1 version, DELL G3 computer

php achieves 3 seconds How to jump to the page

1. Use Header function

<?php
header("Content-type:text/html;charset=utf-8");
header(&#39;Refresh:3,Url=http://www.php.cn/&#39;);   //3s后跳转
echo &#39;3s 后跳转&#39;;
//由于只是普通页面展示,提示的样式容易定制
die;
?>

How to achieve page jump in 3 seconds in php

2. Use echo outputs meta

<?php
header("Content-type:text/html;charset=utf-8");
echo &#39;3s 后跳转&#39;;
echo "<meta http-equiv=&#39;refresh&#39; content=&#39;3; url=http://www.php.cn&#39;>";
die;
?>

How to achieve page jump in 3 seconds in php

Note that the number 3 in the content means how long it will take to start jumping. The setting here is 3, which means it will take It will take 3 seconds for the page to jump to the target page. It is recommended that you set the jump time not to exceed 10 seconds.

Recommended learning: "PHP Video Tutorial"

The above is the detailed content of How to achieve page jump in 3 seconds in php. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools