我在XAMPP Win 7 64位中运行PHP。 当我运行PHP文件时:
<!DOCTYPE html>
<html>
<body>
<?php
print "<h2>PHP is fun!</h2>";
print "Hello world!<br>";
print "I'm about to learn PHP!";
?>
</body>
</html>
我明白了:
PHP is fun!"; print "Hello world!
"; print "I'm about to learn PHP!"; ?>
我使用echo获得相同的结果。
我打开了http://localhost/xampp/
,显示了XAMPP配置。
PHP显示为“已激活”。
在XAMPP页面上,点击 phpinfo ,即可获得:
**PHP Version 5.3.5
System Windows NT MINWINPC 6.1 build 7601 (Unknow Windows version Home Premium Edition Service Pack 1) i586
Build Date Jan 6 2011 17:50:45
Compiler MSVC6 (Visual C++ 6.0)
Architecture x86
Configure Command cscript /nologo configure.js "--enable-snapshot-build" "--disable-isapi" "--enable-debug-pack" "--disable-isapi" "--without-mssql" "--without-pdo-mssql" "--without-pi3web" "--with-pdo-oci=D:\php-sdk\oracle\instantclient10\sdk,shared" "--with-oci8=D:\php-sdk\oracle\instantclient10\sdk,shared" "--with-oci8-11g=D:\php-sdk\oracle\instantclient11\sdk,shared" "--enable-object-out-dir=../obj/" "--enable-com-dotnet" "--with-mcrypt=static"
Server API Apache 2.0 Handler
Virtual Directory Support enabled
Configuration File (php.ini) Path C:\Windows
Loaded Configuration File C:\xampp\php\php.ini
Scan this dir for additional .ini files (none)
Additional .ini files parsed (none)
PHP API 20090626
PHP Extension 20090626
Zend Extension 220090626
Zend Extension Build API220090626,TS,VC6
PHP Extension Build API20090626,TS,VC6
Debug Build no
Thread Safety enabled
Zend Memory Manager enabled
Zend Multibyte Support disabled
IPv6 Support enabled
Registered PHP Streams php, file, glob, data, http, ftp, zip, compress.zlib, compress.bzip2, phar
Registered Stream Socket Transports tcp, udp
Registered Stream Filters convert.iconv.*, mcrypt.*, mdecrypt.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk, zlib.*, bzip2.***
当我运行info.php时,代码为:
<?php
phpinfo();
?>
我得到一个空白页。
显然PHP在某种程度上搞砸了 - 但我该如何解决呢? 我可以在XAMPP中重新安装PHP而无需重新安装XAMP吗?