也许出于无知,我惊讶地发现自己无法在致电phpinfo()
时更改html页面颜色。
进一步的调查使我认为这必须与错误24095(http://www.justskins.com/forums/24095-com-phpinfo-styles-25807.html)有关。
换句话说,这不起作用:
<html>
<head>
<title>My Page: info PHP</title>
<meta charset="UTF-8">
<style>
body { background-color: darkGray;}
#presentation
{
width:500px;
height: 140px;
text-align: center;
color: lightGray;
margin: auto;
margin-top: 40px;
background-color: darkGray;
}
</style>
</head>
<body>
<div id='presentation'>
<h2>Info about PHP</h2>
<p>
See hereunder the current settings for your server
</div>
<? echo phpinfo(); ?>
</body>
</html>
那么在调用phpinfo()
时如何更改页面颜色?
答案 0 :(得分:0)
此代码是一个基于css的相当简单的解决方法:
<html>
<head>
<title>My Page: info PHP</title>
<meta charset="UTF-8">
<style>
body { background-color: darkGray; margin: 0 0 0 0;}
#zPHP { background-color: darkGray; }
#presentation
{
width:500px;
height: 140px;
text-align: center;
color: lightGray;
margin: auto;
margin-top: -20px;
padding-top: 40px;
}
</style>
</head>
<body>
<div id='zPHP'>
<div id='presentation'>
<h2>Info about PHP</h2>
<p>
See hereunder the current settings for your server
</div>
<? echo phpinfo(); ?>
</div>
</body>
</html>
希望它可以帮助一些人。