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


PHP pts_client::init方法代码示例

本文整理汇总了PHP中pts_client::init方法的典型用法代码示例。如果您正苦于以下问题:PHP pts_client::init方法的具体用法?PHP pts_client::init怎么用?PHP pts_client::init使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pts_client的用法示例。


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

示例1: define

	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
	GNU General Public License for more details.

	You should have received a copy of the GNU General Public License
	along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
// INIT
define('PHOROMATIC_SERVER', true);
define('REMOTE_ACCESS', true);
// XXX TODO: Is this still used with new Phoromatic?
//ini_set('memory_limit', '64M');
define('PTS_MODE', 'WEB_CLIENT');
define('PTS_AUTO_LOAD_OBJECTS', true);
error_reporting(E_ALL);
include '../../pts-core.php';
pts_client::init();
$environmental_variables = array('aid' => 'ACCOUNT_ID', 'sid' => 'SYSTEM_ID', 'bid' => 'BENCHMARK_TICKET_ID', 'gsid' => 'GSID', 'a' => 'ACTIVITY', 'r' => 'REQUEST', 'pts' => 'CLIENT_VERSION', 'pts_core' => 'CLIENT_CORE_VERSION', 'h' => 'CLIENT_HARDWARE', 's' => 'CLIENT_SOFTWARE', 'i' => 'ID', 'o' => 'OTHER', 'nm' => 'NETWORK_CLIENT_MAC', 'nw' => 'NETWORK_CLIENT_WOL', 'n' => 'HOSTNAME', 'ti' => 'TEST_IDENTIFIER', 'ts' => 'TRIGGER_STRING', 'time' => 'ESTIMATED_TIME', 'pc' => 'PERCENT_COMPLETE', 'c' => 'COMPOSITE_XML', 'ob' => 'OPENBENCHMARKING_ID', 'sched' => 'SCHEDULE_ID', 'lip' => 'LOCAL_IP', 'j' => 'JSON', 'composite_xml' => 'COMPOSITE_XML', 'composite_xml_gz' => 'COMPOSITE_XML_GZ', 'composite_xml_hash' => 'COMPOSITE_XML_HASH', 'system_logs_zip' => 'SYSTEM_LOGS_ZIP', 'system_logs_hash' => 'SYSTEM_LOGS_HASH', 'msi' => 'PTS_MACHINE_SELF_ID', 'err' => 'ERROR_MSG', 'et' => 'ELAPSED_TIME');
foreach ($environmental_variables as $get_var => $to_var) {
    if (isset($_REQUEST[$get_var]) && !empty($_REQUEST[$get_var])) {
        ${$to_var} = $_REQUEST[$get_var];
    } else {
        ${$to_var} = null;
    }
}
if ($CLIENT_CORE_VERSION < 5312) {
    // Due to major PTS 5.4 development changes, client version bump will be necessary
    $json['phoromatic']['error'] = 'You must update your Phoronix Test Suite clients for compatibility with this Phoromatic server.';
    echo json_encode($json);
    exit;
}
// DATABASE SETUP
开发者ID:rkingsbury,项目名称:phoronix-test-suite,代码行数:31,代码来源:phoromatic.php

示例2: phoromatic_init_web_page_setup

function phoromatic_init_web_page_setup()
{
    if (session_save_path() == null) {
        // This is needed since on at least EL6 by default there is no session_save_path set
        if (is_writable('/var/lib/php') && is_dir('/var/lib/php')) {
            session_save_path('/var/lib/php');
        } else {
            if (is_writable('/var/lib/php5') && is_dir('/var/lib/php5')) {
                session_save_path('/var/lib/php5');
            } else {
                session_save_path('/tmp');
            }
        }
    }
    define('PHOROMATIC_SERVER', true);
    error_reporting(E_ALL);
    session_start();
    define('PTS_MODE', 'WEB_CLIENT');
    define('PTS_AUTO_LOAD_OBJECTS', true);
    define('PHOROMATIC_USER_IS_VIEWER', !isset($_SESSION['AdminLevel']) || $_SESSION['AdminLevel'] >= 10 || $_SESSION['AdminLevel'] < 1 ? true : false);
    include '../../pts-core.php';
    pts_client::init();
}
开发者ID:pchiruma,项目名称:phoronix-test-suite,代码行数:23,代码来源:phoromatic_functions.php


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