How to implement automatic jump in php

Guanhui
Release: 2023-03-01 06:04:01
Original
4287 people have browsed it

How to implement automatic jump in php

How to implement automatic jump in php

1. Set the "Location" in the http response header through the php built-in function "header" Just point to the URL you want to jump;

header('Location: http://www.baidu.com/');
exit();
Copy after login

2. You can point "window.location.href" in the javascript code to the URL you want to jump.

echo "< script language='javascript' type='text/javascript'>"; 
echo "window.location.href='http://www.baidu.com/'"; 
echo "< /script>";
Copy after login

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

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!