当前位置: 动力学知识库 > 问答 > 编程问答 >

How can I open a html file, after a php file is run?

问题描述:

This question already has an answer here:

  • PHP redirect after form completed

    4 answers

网友答案:

use this :

header('Location: http://localhost/yourHtmlFile.html');

but make sure your php didn't output anything before it

update

another workaround is to use include ('yourHtmlFile.html');

网友答案:

PHP can answer code written in HTML back to the browser using echo:

<?php
//do some code
$name="superuser";
echo "Hi ".$name;
?>
分享给朋友:
您可能感兴趣的文章:
随机阅读: