gpt4 book ai didi

php - 如何在 Gwan 和 php 上做 phpinfo

转载 作者:太空宇宙 更新时间:2023-11-03 17:15:30 25 4
gpt4 key购买 nike

在 cent OS 6.4 上,GWAN web/http 服务器和 php 已安装。创建的文件/csp 中的 info.php

<?php
phpinfo();
exit(200);
?>

给出标题

HTTP/1.0 200 OK =>
Server => G-WAN
Date => Thu, 05 Sep 2013 08:21:11 GMT
Last-Modified => Thu, 05 Sep 2013 08:21:11 GMT
ETag => "abc3657a-52283ef8-44d6"
Vary => Accept-Encoding
Accept-Ranges => bytes
Content-Type => text/html; charset=UTF-8
Content-Length => 17622
Connection => close

并输出为

phpinfo() PHP Version => 5.3.3 System => Linux torrent.ms 2.6.32-358.6.2.el6.x86_64 #1 SMP Thu May 16 20:59:36 UTC 2013 x86_64 Build Date => Jul 12 2013 20:33:25 Configure Command => './configure' '--build=x86_64-redhat-linux-gnu' '--host=x86_64-redhat-linux-gnu' '--target=x86_64-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/var/lib' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--cache-file=../config.cache' '--with-libdir=lib64' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d' '--disable-debug' '--with-pic' '--disable-rpath' '--without-pear' '--with-bz2' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--with-xpm-dir=/usr' '--enable-gd-native-ttf' '--without-gdbm' '--with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-pcre-regex=/usr' '--with-zlib' '--with-layout=GNU' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--with-kerberos' '--enable-ucd-snmp-hack' '--enable-shmop' '--enable-calendar' '--without-sqlite' '--with-libxml-dir=/usr' '--enable-xml' '--with-system-tzdata' '--enable-force-cgi-redirect' '--enable-pcntl' '--with-imap=shared' '--with-imap-ssl' '--enable-mbstring=shared' '--enable-mbregex' '--with-gd=shared' '--enable-bcmath=shared' '--enable-dba=shared' '--with-db4=/usr' '--with-xmlrpc=shared' '--with-ldap=shared' '--with-ldap-sasl' '--with-mysql=shared,/usr' '--with-mysqli=shared,/usr/lib64/mysql/mysql_config' '--enable-dom=shared' '--with-pgsql=shared' '--enable-wddx=shared' '--with-snmp=shared,/usr' '--enable-soap=shared' '--with-xsl=shared,/usr' '--enable-xmlreader=shared' '--enable-xmlwriter=shared' 

就像纯文本没有 css 什么都没有,我怎样才能获得常规的 phpinfo 输出?

在通过 GWAN 迁移我的 php 脚本之前,我正在做测试我可以在不修改我的 php 脚本的情况下使用 GWAN 网络服务器吗?

最佳答案

G-WAN gives the output as plain text (no style nothing), and if i remove the exit(200), it gives "The connection was reset" error

exit(200); 告诉 G-WAN 生成状态代码为 200 的 HTTP header (这是您的问题显示的 G-WAN 响应 HTTP header )。

如果您省略了 exit(200),那么 G-WAN 将不会生成 header ,并且您的互联网浏览器将不知道何时停止等待服务器回复,因为未指定此回复的长度(因为没有HTTP header )。

因此,Internet 浏览器(不是 G-WAN)将等待然后超时。

G-WAN 常见问题解答和 G-WAN PDF 手册中提供了更多详细信息。

But it's plaint text, no css, nothing, how can i get a regular phpinfo output ?

G-WAN 正在为您的 PHP 脚本生成的内容提供服务。

此 PHP 脚本未指定任何 HTML header 、正文和 CSS。

根据PHP documentation : “当使用 CLI 模式时,phpinfo() 输出纯文本而不是 HTML。”

G-WAN 可以使用 PHP 作为加载模块,就像为 Java 或 C# 所做的那样,但到目前为止,我们的尝试未能使 PHP 运行时以线程安全的方式工作。

如果 PHP 专家对如何使这项工作有特别的建议,或者如果 PHP 公开发布了一个新的线程安全版本,那么我们将很乐意再试一次。

关于php - 如何在 Gwan 和 php 上做 phpinfo,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18631267/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com