Location: PHPKode > scripts > Particle Gallery > test.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">
<title>Server Test</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<style type="text/css">
	margin: 0px;
	font-size: small;
	font-family: verdana, arial, sans-serif;
<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.

<table cellpadding="0" cellspacing="5" border="0">
		<td>GD Support</td>
		<td>JPEG Support</td>
		<td>GIF Support</td>
		<td>PNG Support</td>
		<td style="padding-right: 20px;">fopen Wrappers</td>
		<td>Writable cache</td>
		<td>Not safe mode</td>
Return current item: Particle Gallery