你好我正在尝试换行。在我的 CMS 中,我添加 phpInfo() 函数并为此更改 css。布尔看起来都不错。当我使用指令时,他看起来像屏幕截图:
我使用的CSS:
#phpinfo {border:none; background: #fff;font-size: 12px; font-weight: normal;}
#phpinfo td, th, h1, h2 {font-weight: normal;}
#phpinfo pre {margin: 0px; font-family: monospace; }
#phpinfo a:link {color: #000099; text-decoration: none; background-color: #ffffff;}
#phpinfo a:hover {text-decoration: underline;}
#phpinfo table {border-collapse: collapse; width:100%; border: none;background-color: #ffffff; }
#phpinfo .center {text-align: center; font-size: 12px; font-weight: normal;word-wrap:break-word;}
#phpinfo .center table { text-align: left; }
#phpinfo .center th { text-align: center !important; background: none repeat scroll 0 0 #F7F7F7;}
#phpinfo td, th { border: 1px solid #ddd; font-size: 100%;}
#phpinfo h1 {font-size: 20px; padding: 20px 0 0 10px;}
#phpinfo h2 {font-size: 18px;}
#phpinfo .p {text-align: left;}
#phpinfo .e { font-weight: normal; padding: 3px; background: #ADD5ED; border-bottom: 1px solid #ddd;}
#phpinfo .h {color: #333; padding-top: 10px; background: #eee}
#phpinfo .v {background-color: #fff; color: #707070; padding: 3px; word-wrap: break-word;}
#phpinfo .vr {background-color: #cccccc; text-align: right; color: #000000;}
#phpinfo img {float: left; border: 0px; padding: 5px;}
#phpinfo hr {width: 800px; background-color: #cccccc; border: 0px; height: 1px; color: #000000;}
PHP
<?php
ob_start();
phpinfo();
$pinfo = ob_get_contents();
ob_end_clean();
echo ( str_replace("module_Zend Optimizer", "module_Zend_Optimizer", preg_replace('%^.*<body>(.*)</body>.*$%ms', '$1', $pinfo)) );
?>
我在自动换行中使用但不起作用。
#phpinfo .v {background-color: #fff; color: #707070; padding: 3px; word-wrap: break-word;}
有什么解决办法吗?