Location: PHPKode > scripts > Particle Gallery > test.php
<?php
// test script to see how compatable the server is
$a = '<span style="color: #33CC33;">Passed</span>';
$b = '<span style="color: #CC0000; font-weight: bold;">Failed</span>';

// work out tests
$gd   = (extension_loaded('gd')) ? $a : $b;
$jpeg = (function_exists("ImageJPEG")) ? $a : $b;
$gif  = (function_exists("ImageGIF")) ? $a : $b;
$png  = (function_exists("ImagePNG")) ? $a : $b;
$thum = (ini_get("allow_url_fopen") == 1) ? $a : $b;
$cach = (is_writable("./cache/")) ? $a : $b;
$safe = (ini_get("safe_mode") == 1) ? $a : $b;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Server Test</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<style type="text/css">
body{
	margin: 0px;
	font-size: small;
	font-family: verdana, arial, sans-serif;
}
</style>
</head>
<body>
<div style="padding: 5px; margin-bottom: 10px;">
	<strong>Server Test</strong><br />
	If everything says found, your server is fully compatible. If not, the script will still run but features like thumbnails are unlikely to be available. It is recommended you leave this file in place in case you need support.
</div>

<table cellpadding="0" cellspacing="5" border="0">
	<tr>
		<td>GD Support</td>
		<td><?=$gd?></td>
	</tr>
	<tr>
		<td>JPEG Support</td>
		<td><?=$jpeg?></td>
	</tr>
	<tr>
		<td>GIF Support</td>
		<td><?=$gif?></td>
	</tr>
	<tr>
		<td>PNG Support</td>
		<td><?=$png?></td>
	</tr>
	<tr>
		<td style="padding-right: 20px;">fopen Wrappers</td>
		<td><?=$thum?></td>
	</tr>
	<tr>
		<td>Writable cache</td>
		<td><?=$cach?></td>
	</tr>
	<tr>
		<td>Not safe mode</td>
		<td><?=$safe?></td>
	</tr>
</table>
</body>
</html>
Return current item: Particle Gallery