Example #1
0
function php_env_check()
{
    $L = $GLOBALS['L'];
    $error = '';
    $base_path = get_path_this(BASIC_PATH) . '/';
    if (!function_exists('iconv')) {
        $error .= '<li>' . $L['php_env_error_iconv'] . '</li>';
    }
    if (!function_exists('mb_convert_encoding')) {
        $error .= '<li>' . $L['php_env_error_mb_string'] . '</li>';
    }
    if (!version_compare(PHP_VERSION, '5.0', '>=')) {
        $error .= '<li>' . $L['php_env_error_version'] . '</li>';
    }
    if (!function_exists('file_get_contents')) {
        $error .= '<li>' . $L['php_env_error_file'] . '</li>';
    }
    if (!path_writable(BASIC_PATH)) {
        $error .= '<li>' . $base_path . '	' . $L['php_env_error_path'] . '</li>';
    }
    if (!path_writable(BASIC_PATH . 'data')) {
        $error .= '<li>' . $base_path . 'data	' . $L['php_env_error_path'] . '</li>';
    }
    if (!path_writable(BASIC_PATH . 'data/system')) {
        $error .= '<li>' . $base_path . 'data/system	' . $L['php_env_error_path'] . '</li>';
    }
    if (!path_writable(BASIC_PATH . 'data/User')) {
        $error .= '<li>' . $base_path . 'data/User	' . $L['php_env_error_path'] . '</li>';
    }
    if (!path_writable(BASIC_PATH . 'data/thumb')) {
        $error .= '<li>' . $base_path . 'data/thumb	' . $L['php_env_error_path'] . '</li>';
    }
    if (!function_exists('imagecreatefromjpeg') || !function_exists('imagecreatefromgif') || !function_exists('imagecreatefrompng') || !function_exists('imagecolorallocate')) {
        $error .= '<li>' . $L['php_env_error_gd'] . '</li>';
    }
    return $error;
}
Example #2
0
function php_env_check()
{
    $L = $GLOBALS['L'];
    $error = '';
    $base_path = get_path_this(BASIC_PATH) . '/';
    if (!function_exists('iconv')) {
        $error .= '<li>' . $L['php_env_error_iconv'] . '</li>';
    }
    if (!function_exists('mb_convert_encoding')) {
        $error .= '<li>' . $L['php_env_error_mb_string'] . '</li>';
    }
    if (!version_compare(PHP_VERSION, '5.0', '>=')) {
        $error .= '<li>' . $L['php_env_error_version'] . '</li>';
    }
    if (!function_exists('file_get_contents')) {
        $error .= '<li>' . $L['php_env_error_file'] . '</li>';
    }
    if (!path_writable(BASIC_PATH)) {
        $error .= '<li>' . $base_path . '	' . $L['php_env_error_path'] . '</li>';
    }
    if (!path_writable(BASIC_PATH . 'data')) {
        $error .= '<li>' . $base_path . 'data	' . $L['php_env_error_path'] . '</li>';
    }
    $parent = get_path_father(BASIC_PATH);
    $arr_check = array(BASIC_PATH, BASIC_PATH . 'data', BASIC_PATH . 'data/system', BASIC_PATH . 'data/User', BASIC_PATH . 'data/thumb');
    foreach ($arr_check as $value) {
        if (!path_writable($value)) {
            $error .= '<li>' . str_replace($parent, '', $value) . '/	' . $L['php_env_error_path'] . '</li>';
        }
    }
    if (!function_exists('imagecreatefromjpeg') || !function_exists('imagecreatefromgif') || !function_exists('imagecreatefrompng') || !function_exists('imagecolorallocate')) {
        $error .= '<li>' . $L['php_env_error_gd'] . '</li>';
    }
    return $error;
}