- ob_start: documentation ( source)
- define: documentation ( source)
<?php
/** PAGE DE TEST POUR MONITORING DES SERVEURS **/
/* NE PAS SUPPRIMER */
$MONITORING_MAINTENANCE = 'MAINTENANCE';
$MONITORING_OK = 'REPONSE_CORRECTE';
$MONITORING_ERROR = 'REPONSE REPONSE_INCORRECTE';
define('WP_USE_THEMES', false);
define('SHORTINIT', true);
define('WP_DEBUG', true);
function lemoniteur_monitoring_failed($content) {
global $MONITORING_ERROR;
return $MONITORING_ERROR;
}
try {
ob_start('lemoniteur_monitoring_failed');
/** Loads the WordPress Environment and Template
* Fails on :
* - DB connection unavailable
* - DB wrong credentials
*/
// require_once(dirname(__FILE__) . '/wp-load.php');
echo $MONITORING_OK;
} catch(Exception $e) {
echo $MONITORING_ERROR;
}