开发者

How do I display PHP information using phpinfo()?

开发者 https://www.devze.com 2023-03-17 10:58 出处:网络
I have phpinfo() text which I want to post and display on another PHP page. My code: ###File index.php <html>

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

精彩评论

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