当前位置: 首页>>代码示例>>PHP>>正文


PHP verify_config函数代码示例

本文整理汇总了PHP中verify_config函数的典型用法代码示例。如果您正苦于以下问题:PHP verify_config函数的具体用法?PHP verify_config怎么用?PHP verify_config使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了verify_config函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: get_summary

            echo "=====================================================================";
            echo get_summary(false, false);
        }
        if ($html_output) {
            fclose($html_file);
        }
        if ($output_file != '' && $just_save_results) {
            save_or_mail_results();
        }
        if (getenv('REPORT_EXIT_STATUS') == 1 and preg_match('/FAILED(?: |$)/', implode(' ', $test_results))) {
            exit(1);
        }
        exit(0);
    }
}
verify_config();
write_information($html_output);
// Compile a list of all test files (*.phpt).
$test_files = array();
$exts_tested = count($exts_to_test);
$exts_skipped = 0;
$ignored_by_ext = 0;
sort($exts_to_test);
$test_dirs = array();
$optionals = array('tests', 'ext', 'Zend', 'ZendEngine2', 'sapi/cli', 'sapi/cgi');
foreach ($optionals as $dir) {
    if (@filetype($dir) == 'dir') {
        $test_dirs[] = $dir;
    }
}
// Convert extension names to lowercase
开发者ID:wgy0323,项目名称:ffmpeg-php,代码行数:31,代码来源:run-tests.php

示例2: save_via_ftp

function save_via_ftp($ftphost, $username, $password, $ftpdir, $config_text)
{
    global $errors;
    list($host, $port) = explode(':', $ftphost);
    if (empty($port)) {
        $port = 21;
    }
    $ftp = ftp_connect($host, $port, 10);
    if ($ftp) {
        if (@ftp_login($ftp, $username, $password)) {
            if ($ftpdir == '' || @ftp_chdir($ftp, $ftpdir)) {
                $file = tempnam(".", "psconf");
                if ($fh = fopen($file, "w")) {
                    fwrite($fh, $config_text);
                    fclose($fh);
                    // delete it first, since some FTP's complain if you overwrite.
                    // we don't care if it fails.
                    @ftp_delete($ftp, 'config.php');
                    if (!@ftp_put($ftp, 'config.php', $file, FTP_ASCII)) {
                        $errors[] = "Unable to upload file to '" . ftp_pwd($ftp) . "'";
                        if (!empty($php_errormsg)) {
                            $errors[] = $php_errormsg;
                        }
                    }
                    @unlink($file);
                } else {
                    $errors[] = "Error creating temporary file for upload!";
                }
            } else {
                $errors[] = "FTP Directory '{$ftpdir}' does not exist!";
            }
        } else {
            $errors[] = "Unable to login to FTP server. Invalid username or password.";
        }
    } else {
        $errors[] = "Unable to connect to FTP server '{$host}:{$port}'";
    }
    if (!$errors) {
        if (!verify_config()) {
            $errors[] = "Config was uploaded to the wrong directory '{$ftpdir}' (DB config doesn't match).";
            $errors[] = "Make sure the FTP directory below is the proper local directory of your PsychoStats website";
            @ftp_delete($ftp, 'config.php');
        }
    }
    if ($ftp) {
        @ftp_close($ftp);
    }
    return $errors;
}
开发者ID:Nerus87,项目名称:PsychoStats,代码行数:49,代码来源:go-save.php


注:本文中的verify_config函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。