开发者

How do I display PHP information using phpinfo()?

I have phpinfo() text which I want to post and display on another PHP page.

My code:

###File index.php

<html>
<form action = "go.php" method = "post">
<input type = "text" name = "msg"><br><br>
<i开发者_高级运维nput type = "submit" value = "Submit">
</form>
<html>

###File go.php :

<?php
    $message = $_POST['msg'];
    echo "Message : ". $message;
?>

How can I show PHP info when sending phpinfo() text with post data?


I'm not sure I'm following you, but it sounds like you want to capture the output of phpinfo(). You can do this with output buffering:

<?php
ob_start();
phpinfo();
$info = ob_end_clean();
?>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜