• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP exit_error函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: validate_file_id

 function validate_file_id(&$file_id)
 {
     if (!$file_id) {
         exit_error("You must specify the ID of the file with the --file_id parameter");
     }
     return true;
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:7,代码来源:CLI_Action_Frs_FileInfo.class.php


示例2: validate_release_id

 function validate_release_id(&$release_id)
 {
     if (!$release_id) {
         exit_error("You must specify the ID of the release with the --release_id parameter");
     }
     return true;
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:7,代码来源:CLI_Action_Frs_Files.class.php


示例3: survey_header

function survey_header($params)
{
    global $group_id, $is_admin_page, $Language;
    $params['toptab'] = 'survey';
    $params['group'] = $group_id;
    $pm = ProjectManager::instance();
    $project = $pm->getProject($group_id);
    if (!$project->usesSurvey()) {
        exit_error($Language->getText('global', 'error'), $Language->getText('survey_s_utils', 's_off'));
    }
    site_project_header($params);
    echo "<P><B>";
    // Admin link is displayed only if the user is a project administrator
    if (user_ismember($group_id, 'A')) {
        echo "<A HREF=\"/survey/admin/?group_id={$group_id}\">" . $Language->getText('survey_s_utils', 'admin') . "</A>";
    }
    if ($is_admin_page && $group_id && user_ismember($group_id, 'A')) {
        echo " | <A HREF=\"/survey/admin/add_survey.php?group_id={$group_id}\">" . $Language->getText('survey_admin_index', 'add_s') . "</A>";
        echo " | <A HREF=\"/survey/admin/edit_survey.php?func=browse&group_id={$group_id}\">" . $Language->getText('survey_admin_browse_survey', 'edit_s') . "</A>";
        echo " | <A HREF=\"/survey/admin/add_question.php?group_id={$group_id}\">" . $Language->getText('survey_admin_index', 'add_q') . "</A>";
        echo " | <A HREF=\"/survey/admin/edit_question.php?func=browse&group_id={$group_id}\">" . $Language->getText('survey_admin_browse_question', 'edit_q') . "</A>";
        echo " | <A HREF=\"/survey/admin/show_results.php?group_id={$group_id}\">" . $Language->getText('survey_s_utils', 'show_r') . "</A>";
    }
    if (isset($params['help'])) {
        if (user_ismember($group_id, 'A')) {
            echo ' | ';
        }
        echo help_button($params['help'], false, $Language->getText('global', 'help'));
    }
    echo "</B><P>";
}
开发者ID:nterray,项目名称:tuleap,代码行数:31,代码来源:survey_utils.php


示例4: validate_is_dependent_on_artifact_ids

 function validate_is_dependent_on_artifact_ids(&$dependencies)
 {
     if (!$dependencies) {
         exit_error("You must specify the dependency(ies) using the --dependencies parameter. (If there is several dependencies, separate the IDs with a comma)");
     }
     return true;
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:7,代码来源:CLI_Action_Tracker_AddDependencies.class.php


示例5: validate_package_name

 function validate_package_name(&$package_name)
 {
     if (!$package_name) {
         exit_error("You must specify the name of the package with the --name parameter");
     }
     return true;
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:7,代码来源:CLI_Action_Frs_AddPackage.class.php


示例6: patch_header

function patch_header($params)
{
    global $group_id, $DOCUMENT_ROOT;
    $params['toptab'] = 'patch';
    $params['group'] = $group_id;
    //only projects can use the bug tracker, and only if they have it turned on
    $project = project_get_object($group_id);
    if (!$project->isProject()) {
        exit_error('Error', 'Only Projects Can Use The Patch Manager');
    }
    if (!$project->usesPatch()) {
        exit_error('Error', 'This Project Has Turned Off The Patch Manager');
    }
    site_project_header($params);
    echo '<P><B><A HREF="/patch/?func=addpatch&group_id=' . $group_id . '">Submit A Patch</A>';
    if (user_isloggedin()) {
        echo ' | <A HREF="/patch/?func=browse&group_id=' . $group_id . '&set=my">My Patches</A>';
    }
    echo ' | <A HREF="/patch/?func=browse&group_id=' . $group_id . '&set=open">Open Patches</A>';
    if (user_isloggedin()) {
        echo ' | <A HREF="/patch/reporting/?group_id=' . $group_id . '">Reporting</A>';
    }
    echo ' | <A HREF="/patch/admin/?group_id=' . $group_id . '">Admin</A>';
    echo '</B>';
}
开发者ID:BackupTheBerlios,项目名称:berlios,代码行数:25,代码来源:patch_utils.php


示例7: bug_header

function bug_header($params)
{
    global $group_id, $is_bug_page, $DOCUMENT_ROOT;
    //used so the search box will add the necessary element to the pop-up box
    $is_bug_page = 1;
    //required params for site_project_header();
    $params['group'] = $group_id;
    $params['toptab'] = 'bugs';
    $project = project_get_object($group_id);
    //only projects can use the bug tracker, and only if they have it turned on
    if (!$project->isProject()) {
        exit_error('Error', 'Only Projects Can Use The Bug Tracker');
    }
    if (!$project->usesBugs()) {
        exit_error('Error', 'This Project Has Turned Off The Bug Tracker');
    }
    echo site_project_header($params);
    echo '<P><B><A HREF="/bugs/?func=addbug&group_id=' . $group_id . '">Submit A Bug</A>
	 | <A HREF="/bugs/?func=browse&group_id=' . $group_id . '&set=open">Open Bugs</A>';
    if (user_isloggedin()) {
        echo ' | <A HREF="/bugs/?func=browse&group_id=' . $group_id . '&set=my">My Bugs</A>';
        echo ' | <A HREF="/bugs/?func=modfilters&group_id=' . $group_id . '">Filters</A>';
        echo ' | <A HREF="/bugs/reporting/?group_id=' . $group_id . '">Reporting</A>';
    }
    echo ' | <A HREF="/bugs/admin/?group_id=' . $group_id . '">Admin</A></B>';
}
开发者ID:BackupTheBerlios,项目名称:berlios,代码行数:26,代码来源:bug_utils.php


示例8: scm_header

/**
 * GForge SCM Library
 *
 * Copyright 2004 (c) GForge LLC
 *
 * @version   $Id$
 * @author Tim Perdue [email protected]
 * @date 2005-04-16
 *
 * This file is part of GForge.
 *
 * GForge is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * GForge is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * 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 GForge; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
function scm_header($params)
{
    global $HTML, $sys_use_scm;
    if (!$sys_use_scm) {
        exit_disabled();
    }
    $project =& group_get_object($params['group']);
    if (!$project || !is_object($project)) {
        exit_error('Error', 'Could Not Get Project');
    } elseif ($project->isError()) {
        exit_error('Error', $project->getErrorMessage());
    }
    if (!$project->usesSCM()) {
        exit_error('Error', _('Error - This project has turned off SCM.'));
    }
    site_project_header(array('title' => _('SCM Repository'), 'group' => $params['group'], 'toptab' => 'scm'));
    /*
    	Show horizontal links
    */
    if (session_loggedin()) {
        $perm =& $project->getPermission(session_get_user());
        if ($perm && is_object($perm) && !$perm->isError() && $perm->isAdmin()) {
            echo $HTML->subMenu(array(_('SCM'), _('Admin'), _('Reporting')), array('/scm/?group_id=' . $params['group'], '/scm/admin/?group_id=' . $params['group'], '/scm/reporting/?group_id=' . $params['group']));
        }
    }
    echo '<div style="width:99%">';
}
开发者ID:neymanna,项目名称:fusionforge,代码行数:52,代码来源:scm_utils.php


示例9: soapResult

 function soapResult($params, $soap_result, $fieldnames = array(), $loaded_params = array())
 {
     if (!$loaded_params['others']['quiet']) {
         $this->show_output($soap_result);
     }
     $session_string = $soap_result->session_hash;
     $user_id = $soap_result->user_id;
     $GLOBALS['LOG']->add("Logged in as user " . $loaded_params['soap']['loginname'] . " (user_id=" . $user_id . "), using session string " . $session_string);
     if (!$loaded_params['others']['quiet']) {
         echo "Logged in.\n";
     }
     $GLOBALS['soap']->setSessionString($session_string);
     $GLOBALS['soap']->setSessionUser($loaded_params['soap']['loginname']);
     $GLOBALS['soap']->setSessionUserID($user_id);
     // If project was specified, get project information and store for future use
     if (isset($loaded_params['others']['projectname'])) {
         $group_id = $this->get_group_id($loaded_params['others']['projectname']);
         if (!$group_id) {
             exit_error('Project "' . $loaded_params['others']['projectname'] . '" doesn\'t exist');
         }
         $GLOBALS['soap']->setSessionGroupID($group_id);
         $GLOBALS['LOG']->add("Using group #" . $group_id);
     }
     $GLOBALS['soap']->saveSession();
 }
开发者ID:nterray,项目名称:tuleap,代码行数:25,代码来源:CLI_Action_Default_Login.class.php


示例10: feature_header

function feature_header($params)
{
    global $group_id, $DOCUMENT_ROOT;
    //required by new site_project_header
    $params['group'] = $group_id;
    $params['toptab'] = 'feature';
    //only projects can use the bug tracker, and only if they have it turned on
    $project = project_get_object($group_id);
    if (!$project->isProject()) {
        exit_error('Error', 'Only Projects Can Use The Feature Request Manager');
    }
    if (!$project->usesFeature()) {
        exit_error('Error', 'This Project Has Turned Off The Feature Request Manager');
    }
    site_project_header($params);
    echo '<P><B><A HREF="/feature/?func=addfeature&group_id=' . $group_id . '">Submit A Feature Request</A>';
    if (user_isloggedin()) {
        echo ' | <A HREF="/feature/?func=browse&group_id=' . $group_id . '&set=my">My Feature Requests</A>';
    }
    echo ' | <A HREF="/feature/?func=browse&group_id=' . $group_id . '&set=open">Open Feature Requests</A>';
    if (user_isloggedin()) {
        echo ' | <A HREF="/feature/reporting/?group_id=' . $group_id . '">Reporting</A>';
    }
    echo ' | <A HREF="/feature/admin/?group_id=' . $group_id . '">Admin</A>';
    echo '</B><P>';
}
开发者ID:BackupTheBerlios,项目名称:berlios,代码行数:26,代码来源:feature_utils.php


示例11: DB_maj_base

  /**
   * Mettre à jour la base de l'établissement
   *
   * @param string   $version_base_structure_actuelle
   * @return void
   */
  public static function DB_maj_base($version_base_structure_actuelle)
  {

    // ////////////////////////////////////////////////////////////////////////////////////////////////////
    // On s'arrête si c'est un pb de fichier non récupéré ou de base inaccessible
    // ////////////////////////////////////////////////////////////////////////////////////////////////////

    if( !VERSION_BASE_STRUCTURE || !$version_base_structure_actuelle )
    {
      exit_error( 'Erreur MAJ BDD' /*titre*/ , 'Fichier avec version de la base manquant, ou base inaccessible.' /*contenu*/ );
    }

    // ////////////////////////////////////////////////////////////////////////////////////////////////////
    // Le fichier commençant à devenir volumineux, les mises à jour ont été archivées par années dans des fichiers séparés.
    // Lors d'un changement d'année n -> n+1, la mise à jour s'effectue dans le fichier n+1 (les 2 sont en fait possible, mais cela évite d'oublier sa création).
    // ////////////////////////////////////////////////////////////////////////////////////////////////////

    $annee_version_actuelle = (int)substr($version_base_structure_actuelle,0,4);
    $annee_version_derniere = (int)substr(VERSION_BASE_STRUCTURE,0,4);

    for( $annee=$annee_version_actuelle ; $annee<=$annee_version_derniere ; $annee++ )
    {
      require(CHEMIN_DOSSIER_SQL.'requetes_structure_maj_base_'.$annee.'.inc.php');
    }


  }
开发者ID:rhertzog,项目名称:lcs,代码行数:33,代码来源:requetes_structure_maj_base.php


示例12: save

 public function save(ServiceProFTPd $service, HTTPRequest $request)
 {
     if ($this->userIsAdmin($request)) {
         $this->saveForAdmin($request);
     }
     exit_error($GLOBALS['Language']->getText('global', 'error_perm_denied'), $GLOBALS['Language']->getText('plugin_proftpd', 'error_not_admin'));
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:7,代码来源:AdminController.class.php


示例13: validate_parent

 function validate_parent(&$parent)
 {
     if (!$parent) {
         exit_error("You must specify the ID of the dst folder with the --parent parameter");
     }
     return true;
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:7,代码来源:CLI_Action_Docman_Move.class.php


示例14: validate_cc_list

 function validate_cc_list(&$cc_list)
 {
     if (!$cc_list) {
         exit_error("You must specify the CC list using the --cc_list parameter");
     }
     return true;
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:7,代码来源:CLI_Action_Tracker_AddCC.class.php


示例15: validate_dependent_on_artifact_id

 function validate_dependent_on_artifact_id(&$dependency)
 {
     if (!$dependency) {
         exit_error("You must specify the dependency to delete using the --dependency parameter.");
     }
     return true;
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:7,代码来源:CLI_Action_Tracker_DeleteDependency.class.php


示例16: before_soapCall

 function before_soapCall(&$loaded_params)
 {
     if (!$loaded_params['others']['file']) {
         exit_error("You must specify a file name with --file parameter.");
     } else {
         if (!file_exists($loaded_params['others']['file'])) {
             exit_error("File '" . $loaded_params['others']['file'] . "' doesn't exist");
         } else {
             if (!($fh = fopen($loaded_params['others']['file'], "rb"))) {
                 exit_error("Could not open '" . $loaded_params['others']['file'] . "' for reading");
             } else {
                 $contents = fread($fh, filesize($loaded_params['others']['file']));
                 $loaded_params['soap']['encoded_data'] = base64_encode($contents);
                 $loaded_params['soap']['filename'] = basename($loaded_params['others']['file']);
                 if (function_exists('mime_content_type')) {
                     $loaded_params['soap']['filetype'] = mime_content_type($loaded_params['others']['file']);
                     // obsolete function to replace by fileinfo if we install pear one day.
                 } else {
                     $loaded_params['soap']['filetype'] = '';
                 }
                 fclose($fh);
                 // sort the parameters in the right order
                 uksort($loaded_params['soap'], array($this, "sort_parameters"));
             }
         }
     }
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:27,代码来源:CLI_Action_Tracker_AddAttachedFile.class.php


示例17: validate_artifact_cc_id

 function validate_artifact_cc_id(&$cc_id)
 {
     if (!$cc_id) {
         exit_error("You must specify the CC to delete using the --cc_id parameter.");
     }
     return true;
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:7,代码来源:CLI_Action_Tracker_DeleteCC.class.php


示例18: survey_header

function survey_header($params)
{
    global $group_id, $is_admin_page, $HTML, $sys_use_survey;
    if (!$sys_use_survey) {
        exit_disabled();
    }
    $params['toptab'] = 'surveys';
    $params['group'] = $group_id;
    if ($project =& group_get_object($group_id)) {
        if (!$project->usesSurvey()) {
            exit_error(_('Error'), _('This Group Has Turned Off Surveys.'));
        }
        site_project_header($params);
        if ($is_admin_page && $group_id) {
            echo $HTML->subMenu(array(_('Surveys'), _('Admin'), _('Add Survey'), _('Edit Survey'), _('Add Questions'), _('Edit Questions'), _('Show Results')), array('/survey/?group_id=' . $group_id, '/survey/admin/?group_id=' . $group_id, '/survey/admin/add_survey.php?group_id=' . $group_id, '/survey/admin/edit_survey.php?group_id=' . $group_id, '/survey/admin/add_question.php?group_id=' . $group_id, '/survey/admin/show_questions.php?group_id=' . $group_id, '/survey/admin/show_results.php?group_id=' . $group_id));
        } else {
            if (session_loggedin()) {
                $perm =& $project->getPermission(session_get_user());
                if ($perm && is_object($perm) && !$perm->isError() && $perm->isAdmin()) {
                    echo $HTML->subMenu(array(_('Admin')), array('/survey/admin/?group_id=' . $group_id));
                }
            }
        }
    }
    // end if (valid group id)
}
开发者ID:neymanna,项目名称:fusionforge,代码行数:26,代码来源:survey_utils.php


示例19: validate_artifact_id

 function validate_artifact_id(&$artifact_id)
 {
     if (!$artifact_id) {
         exit_error("You must specify an artifactID using the --artifact_id parameter");
     }
     return true;
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:7,代码来源:CLI_Action_Tracker_AttachedFiles.class.php


示例20: validate_item_id

 function validate_item_id(&$item_id)
 {
     if (!$item_id) {
         exit_error("You must specify the ID of the folder with the --id parameter");
     }
     return true;
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:7,代码来源:CLI_Action_Docman_List.class.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP exit_fail函数代码示例发布时间:2022-05-15
下一篇:
PHP exitZP函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap