用PHP写一个等待3秒跳转代码
可以使用PHP的header()函数和sleep()函数来实现等待3秒后跳转的功能。
<?php
// 等待3秒
sleep(3);
// 跳转到指定页面
header('Location: http://example.com');
exit;
?>
在上面的代码中,sleep(3)表示等待3秒,header('Location: http://example.com')表示跳转到指定的页面,exit函数用于终止脚本的执行。请将http://example.com替换为实际要跳转的页面的URL。
原文地址: https://www.cveoy.top/t/topic/ilYR 著作权归作者所有。请勿转载和采集!