本文整理汇总了PHP中start函数的典型用法代码示例。如果您正苦于以下问题:PHP start函数的具体用法?PHP start怎么用?PHP start使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了start函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: restart
function restart()
{
$unix = new unix();
$pidfile = "/etc/artica-postfix/pids/" . basename(__FILE__) . "." . __FUNCTION__ . ".pid";
$pid = $unix->get_pid_from_file($pidfile);
if ($unix->process_exists($pid, basename(__FILE__))) {
$time = $unix->PROCCESS_TIME_MIN($pid);
if ($GLOBALS["OUTPUT"]) {
echo "Starting......: " . date("H:i:s") . " [INIT]: {$GLOBALS["TITLENAME"]} Already Artica task running PID {$pid} since {$time}mn\n";
}
return;
}
@file_put_contents($pidfile, getmypid());
build_progress("{stopping_service}", 10);
stop(true);
build_progress("{reconfiguring}", 40);
build();
sleep(1);
build_progress("{starting_service}", 45);
if (!start(true)) {
build_progress("{starting_service} {failed}", 110);
return;
}
system("/etc/init.d/monit restart");
build_progress("{starting_service} {success}", 100);
}
示例2: restart
function restart()
{
$unix = new unix();
$shorewall = $unix->find_program("shorewall");
if (!is_file($shorewall)) {
return;
}
$pidfile = "/etc/artica-postfix/pids/" . basename(__FILE__) . "." . __FUNCTION__ . ".pid";
$pid = $unix->get_pid_from_file($pidfile);
if ($unix->process_exists($pid, basename(__FILE__))) {
$time = $unix->PROCCESS_TIME_MIN($pid);
if ($GLOBALS["OUTPUT"]) {
echo "Stopping......: " . date("H:i:s") . " [INIT]: {$GLOBALS["TITLENAME"]}, Already task running PID {$pid} since {$time}mn\n";
}
return;
}
stop(true);
start(true);
if (is_file("/etc/init.d/ssh")) {
if ($GLOBALS["OUTPUT"]) {
echo "Stopping......: " . date("H:i:s") . " [INIT]: {$GLOBALS["TITLENAME"]}, restarting SSH service.\n";
}
system("/etc/init.d/ssh restart");
}
if ($GLOBALS["OUTPUT"]) {
echo "Stopping......: " . date("H:i:s") . " [INIT]: {$GLOBALS["TITLENAME"]}, ACTION DONE.\n";
}
}
示例3: newGame
function newGame()
{
start();
echo "<div class='title'> " . getNumber() . " </div>";
echo "<div class='sub-title'>Quedan por salir - " . getRest() . "</div>";
drawBoard();
fillTable(18);
showTable();
}
示例4: logout
function logout()
{
global $pid, $pcat;
$pid = '';
$pcat = '';
setcookie("player");
setcookie("CUP_ID");
start();
}
示例5: check
function check($queue_name)
{
$pidfile = APP . "log/monitor/{$queue_name}.pid";
if (file_exists($pidfile)) {
$pid = file_get_contents($pidfile);
// debugLog("check {$queue_name} pid = $pid");
if (!intval($pid) || !posix_kill($pid, 0)) {
debugLog("{$queue_name} pid = {$pid} is kill");
start($queue_name);
}
} else {
start($queue_name);
}
}
示例6: display
/**
* This is the default function that is run the first time this script is called.
* This function creates an initial state of the world, and displays it within an HTML structure.
*/
function display()
{
# Global Variables
global $world, $cell_size;
# Create Initial Random Chaos within the world
start();
$_SESSION['world'] = $world;
# Create a graphical representation of the world
$content = display_world($world);
# Generaet the HTML for the page
$html = "\n\t<html>\n\t\t<head>\n\t\t\t<title>Game of Life | Implementation by Ralfe Poisson</title>\n\t\t\t<style>\n\t\t\t\t* {\n\t\t\t\t\tfont-size: 10px;\n\t\t\t\t}\n\t\t\t\ttable tr td {\n\t\t\t\t\twidth: {$cell_size};\n\t\t\t\t\theight: {$cell_size};\n\t\t\t\t\tfont-size: 1px;\n\t\t\t\t}\n\t\t\t</style>\n\t\t\t<script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js'></script>\n\t\t\t<script>\n\t\t\t\tfunction refresh_gof() {\n\t\t\t\t\tvar new_html = \$.ajax({\n\t\t\t\t\t\turl: 'php-gol.php?action=refresh',\n\t\t\t\t\t\ttype: 'html',\n\t\t\t\t\t\tasync: false\n\t\t\t\t\t}).responseText;\n\t\t\t\t\t\$('#gof').html(new_html);\n\t\t\t\t}\n\t\t\t\tsetInterval('refresh_gof()', 1000);\n\t\t\t</script>\n\t\t</head>\n\t\t<body>\n\t\t\t<div id='gof'>\n\t\t\t\t{$content}\n\t\t\t</div>\n\t\t</body>\t\n\t</html>";
# Display the html page
print $html;
}
示例7: restart
function restart()
{
$unix = new unix();
$pidfile = "/etc/artica-postfix/pids/" . basename(__FILE__) . "." . __FUNCTION__ . ".pid";
$pid = $unix->get_pid_from_file($pidfile);
if ($unix->process_exists($pid, basename(__FILE__))) {
$time = $unix->PROCCESS_TIME_MIN($pid);
if ($GLOBALS["OUTPUT"]) {
echo "Starting......: " . date("H:i:s") . " [INIT]: Memcached Already Artica task running PID {$pid} since {$time}mn\n";
}
return;
}
@file_put_contents($pidfile, getmypid());
stop(true);
start(true);
}
示例8: executeCommand
function executeCommand($params, $chatID)
{
// Prepare an array of parameters without the command
for ($i = 1; $i < count($params); $i++) {
$parameters[$i - 1] = $params[$i];
}
$command = $params[0];
// Execute command
if ($command == "/start") {
start($chatID);
}
if ($command == "/help") {
help($chatID);
}
if ($command == "/tex") {
tex($chatID, $parameters);
}
}
示例9: restart
function restart()
{
$unix = new unix();
$pidfile = "/etc/artica-postfix/pids/" . basename(__FILE__) . "." . __FUNCTION__ . ".pid";
$pid = $unix->get_pid_from_file($pidfile);
if ($unix->process_exists($pid, basename(__FILE__))) {
$time = $unix->PROCCESS_TIME_MIN($pid);
if ($GLOBALS["OUTPUT"]) {
echo "Starting......: " . date("H:i:s") . " [INIT]: {$GLOBALS["TITLENAME"]} Already Artica task running PID {$pid} since {$time}mn\n";
}
return;
}
@file_put_contents($pidfile, getmypid());
vsftpd_admin_mysql(1, "Restarting VSFTPD service...", null, __FILE__, __LINE__);
stop(true);
sleep(1);
start(true);
}
示例10: restart
function restart()
{
$users = new usersMenus();
$unix = new unix();
if (!$users->ETTERCAP_INSTALLED) {
echo "ArpSpoofing.........: [STOP]: Ettercap, not installed...\n";
return;
}
$me = basename(__FILE__);
$pidfile = "/etc/artica-postfix/pids/" . basename(__FILE__) . ".pid";
$pid = $unix->get_pid_from_file($pidfile);
if ($unix->process_exists($pid, $me)) {
$time = $unix->PROCCESS_TIME_MIN($pid);
echo "ArpSpoofing.........: [RESTART]: Ettercap, Already start instance executed PID {$pid} since {$time}Mn...\n";
return;
}
@file_put_contents($pidfile, getmypid());
stop(true);
start(true);
}
示例11: restart
function restart()
{
$unix = new unix();
$pidfile = "/etc/artica-postfix/pids/" . basename(__FILE__) . "." . __FUNCTION__ . ".pid";
$pid = $unix->get_pid_from_file($pidfile);
if ($unix->process_exists($pid, basename(__FILE__))) {
$time = $unix->PROCCESS_TIME_MIN($pid);
if ($GLOBALS["OUTPUT"]) {
echo "Restarting....: [INIT]: {$GLOBALS["TITLENAME"]} Already Artica task running PID {$pid} since {$time}mn\n";
}
return;
}
@file_put_contents($pidfile, getmypid());
$pid = PID_NUM();
if ($unix->process_exists($pid)) {
$time = $unix->PROCCESS_TIME_MIN($pid);
if ($GLOBALS["OUTPUT"]) {
echo "Restarting....: [INIT]: {$GLOBALS["TITLENAME"]} PID {$pid} running since {$time}mn\n";
}
}
stop(true);
sleep(1);
start(true);
}
示例12: restart
function restart()
{
$unix = new unix();
$pidfile = "/etc/artica-postfix/pids/" . basename(__FILE__) . "." . __FUNCTION__ . ".pid";
$pid = $unix->get_pid_from_file($pidfile);
if ($unix->process_exists($pid, basename(__FILE__))) {
$time = $unix->PROCCESS_TIME_MIN($pid);
if ($GLOBALS["OUTPUT"]) {
echo "Starting......: " . date("H:i:s") . " [INIT]: {$GLOBALS["TITLENAME"]} Already Artica task running PID {$pid} since {$time}mn\n";
}
return;
}
@file_put_contents($pidfile, getmypid());
build_progress(10, "{stopping} {APP_FRESHCLAM}");
stop(true);
build_progress(50, "{building_configuration}");
build();
sleep(1);
build_progress(70, "{starting} {APP_FRESHCLAM}");
if (start(true)) {
if ($GLOBALS["PROGRESS"]) {
build_progress(95, "{restarting} {watchdog}");
system("/etc/init.d/artica-status restart");
}
build_progress(100, "{done} {APP_FRESHCLAM}");
}
}
示例13: define
<?php
// Version
define('VERSION', '2.2.0.1b');
// Configuration
if (is_file('config.php')) {
require_once 'config.php';
}
// Install
if (!defined('DIR_APPLICATION')) {
header('Location: ../install/index.php');
exit;
}
// Startup
require_once DIR_SYSTEM . 'startup.php';
start('admin');
示例14: restart
function restart()
{
$unix = new unix();
$pidfile = "/etc/artica-postfix/pids/" . basename(__FILE__) . "." . __FUNCTION__ . ".pid";
$pid = $unix->get_pid_from_file($pidfile);
if ($unix->process_exists($pid, basename(__FILE__))) {
$time = $unix->PROCCESS_TIME_MIN($pid);
if ($GLOBALS["OUTPUT"]) {
echo "ReStarting......: " . date("H:i:s") . " [INIT]: {$GLOBALS["TITLENAME"]} Already Artica task running PID {$pid} since {$time}mn\n";
}
return;
}
@file_put_contents($pidfile, getmypid());
stop(true);
if ($GLOBALS["OUTPUT"]) {
echo "Restarting....: [INIT]: {$GLOBALS["TITLENAME"]} Removing sessions\n";
}
remove_sessions();
if ($GLOBALS["OUTPUT"]) {
echo "Restarting....: [INIT]: {$GLOBALS["TITLENAME"]} Building rules\n";
}
build();
start(true);
if ($GLOBALS["OUTPUT"]) {
echo "Restarting....: [INIT]: {$GLOBALS["TITLENAME"]} Success starting PID 0\n";
}
}
示例15: icon
<?php
include_once('ressources/class.templates.inc');
include_once('ressources/class.ldap.inc');
include_once('ressources/class.users.menus.inc');
include_once('ressources/class.mysql.inc');
if(isset($_GET["popup"])){popup();exit;}
if(isset($_GET["find"])){find();exit;}
if(isset($_GET["icon"])){icon();exit;}
if(isset($_GET["start"])){start();exit;}
if(isset($_POST["UnityPurge"])){UnityPurge();exit;}
js();
function icon(){
return;
$users=new usersMenus();
$tpl=new templates();
$LinuxDistriCode=$users->LinuxDistriCode;
$LinuxDistriCodeIMG="unity-ubuntu-22.png";
if($LinuxDistriCode=="DEBIAN"){$LinuxDistriCodeIMG="unity-debian-22.png";}
if($LinuxDistriCode=="CENTOS"){$LinuxDistriCodeIMG="CENTOS-22.png";}
if($LinuxDistriCode=="SUSE"){$LinuxDistriCodeIMG="unity-suse-22.png";}
echo $tpl->_ENGINE_parse_body("<span style='float:left;margin-left:-4px'>".imgtootltip($LinuxDistriCodeIMG,"{find_features_and_options}","Loadjs('unity.php')")."</span>");
}
function js(){