/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php /* set required extensions */ 'gd', //graphics library 'xml', //xml 'mysql', //database 'curl', //networking 'openssl', //site will need SSL 'pecl' //pear ); //get loaded modules ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title><?php echo $source_article; ?> Example</title> <style type="text/css"> body { font-size:12px; } h2 { border-bottom:1px solid #ccc; font-weight:normal; font-size:18px; margin-bottom:5px; padding-bottom:2px; } p { line-height:20px; margin-top:0; } .found { background:lightgreen; padding:5px 10px; margin:0 0 10px 0; } .miss { background:pink; padding:5px 10px; margin:0 0 10px 0; } .extra { background:lightblue; padding:5px 10px; margin:0 0 10px 0; } </style> </head> <body> <h1><?php echo $_SERVER['HTTP_HOST']; ?></h1> <h2>General Information</h2> <p> <strong>Server Software:</strong> <?php echo $_SERVER['SERVER_SOFTWARE']; ?><br /> <strong>Document Root:</strong> <?php echo $_SERVER['DOCUMENT_ROOT']; ?><br /> </p> <h2>Extension Check</h2> <?php /* print out */ //analyze results foreach($my_required_extensions as $ext) { { } else { } } //print out results foreach($matches as $match) { echo '<div class="found"><strong>',$match,'</strong> found!</div>'; } foreach($missings as $miss) { echo '<div class="miss"><strong>',$miss,'</strong> missing!</div>'; } ?><br /> </body> </html>
URL: http://blog.jeremymartin.name/2008/04/know-your-environment-php-server-module.html