Home > Backend Development > PHP Problem > How to automatically close the current page in php

How to automatically close the current page in php

青灯夜游
Release: 2023-03-08 12:48:01
Original
5575 people have browsed it

How PHP automatically closes the current page: Use the echo function to output the "" statement. close() is used to close the browser window.

How to automatically close the current page in php

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

php automatically closes the current page

<?php
echo "<script type=&#39;text/javascript&#39;>document.onload = window.close();</script>";
?>
Copy after login

Description:

echo() function outputs one or more strings.

The close() method of window is used to close the browser window.

Recommended learning: "PHP Video Tutorial"

The above is the detailed content of How to automatically close the current page in php. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
php
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