function xoDiagIfWritable($path) { $path = "../" . $path; $error = true; if (!is_dir($path)) { if (file_exists($path)) { @chmod($path, 0666); $error = !is_writeable($path); } } else { @chmod($path, 0777); $error = !is_writeable($path); } return xoDiag($error ? -1 : 1, $error ? 'Not writable' : 'Writable'); }
/** * @return string */ function xoPhpVersion() { if (version_compare(phpversion(), '5.4.0', '>=')) { return xoDiag(1, phpversion()); } else { return xoDiag(-1, phpversion()); } }
/** * @return string */ function xoPhpVersion() { if (version_compare(phpversion(), '5.3.7', '>=')) { return xoDiag(1, phpversion()); //} elseif (version_compare(phpversion(), '5.3.7', '>=')) { // return xoDiag(0, phpversion()); } else { return xoDiag(-1, phpversion()); } }
printf(PHP_EXTENSION, 'Session'); ?> </th> <td><?php echo xoDiag(extension_loaded('session') ? 1 : -1); ?> </td> </tr> <tr> <th><?php printf(PHP_EXTENSION, 'PCRE'); ?> </th> <td><?php echo xoDiag(extension_loaded('pcre') ? 1 : -1); ?> </td> </tr> <tr> <th scope="row">file_uploads</th> <td><?php echo xoDiagBoolSetting('file_uploads', true); ?> </td> </tr> </tbody> </table> <table class="diags">
printf(PHP_EXTENSION, 'PCRE'); ?> </th> <td><?php echo xoDiag(extension_loaded('pcre') ? 1 : -1); ?> </td> </tr> <tr> <th><?php printf(PHP_EXTENSION, 'filter'); ?> </th> <td><?php echo xoDiag(extension_loaded('filter') ? 1 : -1); ?> </td> </tr> <tr> <th scope="row">file_uploads</th> <td><?php echo xoDiagBoolSetting('file_uploads', true); ?> </td> </tr> </tbody> </table> <table class="diags">
printf(PHP_EXTENSION, 'OpenSSL'); ?> </th> <td><?php echo xoDiag(extension_loaded('openssl') ? 1 : -1); ?> </td> </tr> <tr> <th><?php printf(PHP_EXTENSION, 'JSON'); ?> </th> <td><?php echo xoDiag(extension_loaded('json') ? 1 : -1); ?> </td> </tr> <tr> <th scope="row">file_uploads</th> <td><?php echo xoDiagBoolSetting('file_uploads', true); ?> </td> </tr> </tbody> </table> <div class="caption"><?php