document.onload = window.close();" statement. close() is used to close the browser window."/> document.onload = window.close();" statement. close() is used to close the browser window.">

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

How to automatically close the current page in php

青灯夜游
青灯夜游Original
2021-03-04 17:53:255497browse

How PHP automatically closes the current page: Use the echo function to output the "7c6ecc2a75ade4ffa1f50134f6be3b0edocument.onload = window.close();2cacc6d41bbb37262a98f745aa00fbf0" 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>";
?>

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!

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