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

PHP isDebug函数代码示例

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

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



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

示例1: validate

 /**
  * Video Validate.
  *
  * @return boolean
  * @throws \PH7\Framework\Error\CException\PH7BadMethodCallException If the video file is not found.
  */
 public function validate()
 {
     if (!is_file($this->aFile['tmp_name'])) {
         if (!isDebug()) {
             return false;
         } else {
             throw new \PH7\Framework\Error\CException\PH7BadMethodCallException('Video file not found: The video file \'' . $this->aFile['tmp_name'] . '\' could not be found.');
         }
     } else {
         switch ($this->sType) {
             // Files supported List.
             case 'mov':
             case 'avi':
             case 'flv':
             case 'mp4':
             case 'mpg':
             case 'mpeg':
             case 'wmv':
             case 'ogg':
             case 'ogv':
             case 'webm':
             case 'mkv':
                 return true;
                 break;
             default:
                 return false;
         }
     }
 }
开发者ID:joswilson,项目名称:NotJustOK,代码行数:35,代码来源:Video.class.php


示例2: __construct

 public function __construct()
 {
     parent::__construct();
     /**
      * This can cause minor errors (eg if a user sent a file that is not a video).
      * So we hide the errors if we are not in development mode.
      */
     if (!isDebug()) {
         error_reporting(0);
     }
     // Resizing and saving the video album thumbnail
     $oPicture = new Image($_FILES['album']['tmp_name']);
     if (!$oPicture->validate()) {
         \PFBC\Form::setError('form_video_album', Form::wrongImgFileTypeMsg());
     } else {
         $iApproved = DbConfig::getSetting('videoManualApproval') == 0 ? '1' : '0';
         $sFileName = Various::genRnd($oPicture->getFileName(), 1) . '-thumb.' . $oPicture->getExt();
         (new VideoModel())->addAlbum($this->session->get('member_id'), $this->httpRequest->post('name'), $this->httpRequest->post('description'), $sFileName, $this->dateTime->get()->dateTime('Y-m-d H:i:s'), $iApproved);
         $iLastAlbumId = (int) Db::getInstance()->lastInsertId();
         $oPicture->square(200);
         /* Set watermark text on thumbnail */
         $sWatermarkText = DbConfig::getSetting('watermarkTextImage');
         $iSizeWatermarkText = DbConfig::getSetting('sizeWatermarkTextImage');
         $oPicture->watermarkText($sWatermarkText, $iSizeWatermarkText);
         $sPath = PH7_PATH_PUBLIC_DATA_SYS_MOD . 'video/file/' . $this->session->get('member_username') . PH7_DS . $iLastAlbumId . PH7_DS;
         $this->file->createDir($sPath);
         $oPicture->save($sPath . $sFileName);
         /* Clean VideoModel Cache */
         (new Framework\Cache\Cache())->start(VideoModel::CACHE_GROUP, null, null)->clear();
         HeaderUrl::redirect(Uri::get('video', 'main', 'addvideo', $iLastAlbumId));
     }
 }
开发者ID:joswilson,项目名称:NotJustOK,代码行数:32,代码来源:AlbumFormProcess.php


示例3: __construct

 /**
  * DataPool constructor.
  * @param array $conf
  */
 public function __construct($conf = [])
 {
     if (!$conf) {
         $conf = \Flight::get('config')->get('datapool');
         $conf['debug'] = isDebug();
     }
     $this->dataPool = new DefaultDataPool($conf, ROOT);
 }
开发者ID:wwtg99,项目名称:flight2wwu,代码行数:12,代码来源:DataPool.php


示例4: enableLogging

 /**
  * 设置是否写SQL日志
  *
  * @return bool
  */
 public static function enableLogging($bool = null)
 {
     if (null !== $bool) {
         self::$_enableLogging = (bool) $bool;
     }
     // 非调试模式下永远为否
     return !isDebug() ? false : self::$_enableLogging;
 }
开发者ID:645248882,项目名称:CocoPHP,代码行数:13,代码来源:Db.php


示例5: debug

function debug($msg, $debugReason = 'other')
{
    if (isDebug($debugReason)) {
        if (is_array($msg)) {
            $msg = print_r($msg, true);
        }
        echo PHP_EOL . '<!-- ' . date(DATE_RFC822) . PHP_EOL . $msg . PHP_EOL . ' -->' . PHP_EOL;
    }
}
开发者ID:availabs,项目名称:gtfsr2siri,代码行数:9,代码来源:common.inc.php


示例6: __construct

 public function __construct()
 {
     parent::__construct();
     /***** Securing the server for DDoS attack only! Not for the attacks DoS *****/
     if (!isDebug() && M\DbConfig::getSetting('DDoS')) {
         $oDDoS = new Stop();
         if ($oDDoS->cookie() || $oDDoS->session()) {
             sleep(PH7_DDOS_DELAY_SLEEP);
         }
         unset($oDDoS);
     }
     /*
     if ($this->browser->isMobile())
     {
         \PH7\Framework\Url\HeaderUrl::redirect('mobile');
     }
     */
     /***** Assign the values for Registry Class *****/
     // URL
     $this->registry->site_url = PH7_URL_ROOT;
     $this->registry->url_relative = PH7_RELATIVE;
     $this->registry->page_ext = PH7_PAGE_EXT;
     // Site Name
     $this->registry->site_name = M\DbConfig::getSetting('siteName');
     /***** Internationalization *****/
     // Default path language
     $this->lang->load('global', PH7_PATH_APP_LANG);
     /***** PH7Tpl Template Engine initialization *****/
     /*** Assign the global variables ***/
     /*** Objects ***/
     $this->view->config = $this->config;
     $this->view->design = $this->design;
     /***** Info *****/
     $oInfo = M\DbConfig::getMetaMain(PH7_LANG_NAME);
     $aMetaVars = ['site_name' => $this->registry->site_name, 'page_title' => $oInfo->pageTitle, 'slogan' => $oInfo->slogan, 'meta_description' => $oInfo->metaDescription, 'meta_keywords' => $oInfo->metaKeywords, 'meta_author' => $oInfo->metaAuthor, 'meta_robots' => $oInfo->metaRobots, 'meta_copyright' => $oInfo->metaCopyright, 'meta_rating' => $oInfo->metaRating, 'meta_distribution' => $oInfo->metaDistribution, 'meta_category' => $oInfo->metaCategory, 'header' => 0];
     $this->view->assigns($aMetaVars);
     unset($oInfo);
     /**
      * This test is not necessary because if there is no session,
      * the get() method of the \PH7\Framework\Session\Session object an empty value and revisit this avoids having undefined variables in some modules (such as the "connect" module).
      */
     //if (\PH7\UserCore::auth()) {
     $this->view->count_unread_mail = \PH7\MailCoreModel::countUnreadMsg($this->session->get('member_id'));
     $this->view->count_pen_friend_request = \PH7\FriendCoreModel::getPenFd($this->session->get('member_id'));
     //}
     /***** Display *****/
     $this->view->setTemplateDir($this->registry->path_module_views . PH7_TPL_MOD_NAME);
     /***** End Template Engine PH7Tpl *****/
     // For permission the modules
     if (is_file($this->registry->path_module_config . 'Permission.php')) {
         require $this->registry->path_module_config . 'Permission.php';
         new \PH7\Permission();
     }
 }
开发者ID:joswilson,项目名称:NotJustOK,代码行数:54,代码来源:Controller.class.php


示例7: validate

 /**
  * Video Validate.
  *
  * @return boolean
  * @throws \PH7\Framework\Error\CException\PH7BadMethodCallException If the video file is not found.
  */
 public function validate()
 {
     if (!is_uploaded_file($this->aFile['tmp_name'])) {
         if (!isDebug()) {
             return false;
         } else {
             throw new \PH7\Framework\Error\CException\PH7BadMethodCallException('The file could not be uploaded. Possibly too large.');
         }
     } else {
         return in_array($this->sType, $this->aAllowedTypes);
     }
 }
开发者ID:huangciyin,项目名称:pH7-Social-Dating-CMS,代码行数:18,代码来源:Video.class.php


示例8: jQuery_migrate_init

function jQuery_migrate_init()
{
    global $thisfile_GSJQM, $SITEURL;
    i18n_merge($thisfile_GSJQM) || i18n_merge($thisfile_GSJQM, GSDEFAULTLANG);
    # register plugin
    register_plugin($thisfile_GSJQM, i18n_r($thisfile_GSJQM . '/GSJQMigrate_TITLE'), '1.0', 'GetSimpleCMS', 'http://get-simple.info', i18n_r($thisfile_GSJQM . '/GSJQMigrate_DESC'), '', '');
    $asset = isDebug() ? 'jquery-migrate-1.2.1.js' : 'jquery-migrate-1.2.1.min.js';
    // when debug is on, migrate will output to console with deprecated notices.
    $url = $SITEURL . 'plugins/' . $thisfile_GSJQM . '/assets/js/' . $asset;
    register_script('jquerymigrate', $url, '', FALSE);
    queue_script('jquerymigrate', GSBACK);
}
开发者ID:HelgeSverre,项目名称:GetSimpleCMS,代码行数:12,代码来源:GSJQueryMigrate.php


示例9: index

 /**
  * Displaying the main homepage of the website.
  */
 public function index()
 {
     // We must not put the title as this is the homepage, so this is the default title is used.
     // For Profiles Carousel
     $this->view->userDesignModel = new UserDesignCoreModel();
     $this->view->userDesign = new UserDesignCore();
     // Only visitors
     if (!UserCore::auth()) {
         // Set CSS and JS files
         $this->design->addCss(PH7_LAYOUT . PH7_TPL . PH7_TPL_NAME . PH7_SH . PH7_CSS, 'splash.css,tooltip.css,js/jquery/carousel.css');
         $this->design->addJs(PH7_DOT, PH7_STATIC . PH7_JS . 'jquery/carouFredSel.js,' . PH7_LAYOUT . PH7_TPL . PH7_TPL_NAME . PH7_SH . PH7_JS . 'splash.js');
         // Assigns the promo text to the view
         $this->view->promo_text = DbConfig::getMetaMain(PH7_LANG_NAME)->promoText;
         // Assign the background video option
         $this->view->is_bg_video = DbConfig::getSetting('bgSplashVideo');
         // To check if the site is called by a mobile native app
         $bMobApp = $this->view->is_mobapp = MobApp::is();
         /**
          * When you are in the development mode, you can force the guest page by set a "force" GET request with the "splash" or "classic" parameter.
          * Example: "/?force=splash" or "/?force=classic"
          */
         if (isDebug() && $this->httpRequest->getExists('force')) {
             switch ($this->httpRequest->get('force')) {
                 case 'classic':
                     $sPage = 'index.guest';
                     break;
                 case 'splash':
                     $sPage = 'index.guest_splash';
                     break;
                 default:
                     exit('You can only choose between "classic" or "splash"');
             }
         } elseif ($bMobApp) {
             $sPage = 'index.guest_splash';
         } else {
             $bIsSplashPage = (bool) DbConfig::getSetting('splashPage');
             $sPage = $bIsSplashPage ? 'index.guest_splash' : 'index.guest';
         }
         $this->manualTplInclude($sPage . '.inc.tpl');
     } elseif (UserCore::auth()) {
         // Set CSS and JS files
         $this->design->addCss(PH7_LAYOUT . PH7_TPL . PH7_TPL_NAME . PH7_SH . PH7_CSS, 'zoomer.css');
         $this->design->addJs(PH7_STATIC . PH7_JS, 'zoomer.js,Wall.js');
         // Assigns the user's first name to the view for the Welcome Message
         $this->view->first_name = $this->session->get('member_first_name');
         $this->manualTplInclude('index.user.inc.tpl');
     }
     $this->output();
 }
开发者ID:huangciyin,项目名称:pH7-Social-Dating-CMS,代码行数:52,代码来源:MainController.php


示例10: validate

 /**
  * @desc Image Validate.
  * @return boolean
  * @throws \PH7\Framework\Error\CException\PH7BadMethodCallException If the image file is not found.
  */
 public function validate()
 {
     $mImgType = $this->getType();
     if (!is_file($this->sFile) || !$mImgType) {
         if (isDebug()) {
             throw new \PH7\Framework\Error\CException\PH7BadMethodCallException('The file could not be uploaded. Possibly too large.');
         } else {
             return false;
         }
     } else {
         switch ($mImgType) {
             // JPG
             case static::JPG:
                 $this->rImage = imagecreatefromjpeg($this->sFile);
                 $this->sType = 'jpg';
                 break;
                 // PNG
             // PNG
             case static::PNG:
                 $this->rImage = imagecreatefrompng($this->sFile);
                 $this->sType = 'png';
                 break;
                 // GIF
             // GIF
             case static::GIF:
                 $this->rImage = imagecreatefromgif($this->sFile);
                 $this->sType = 'gif';
                 break;
             case static::WEBP:
                 $this->rImage = imagecreatefromgif($this->sFile);
                 $this->sType = 'webp';
                 break;
                 // Invalid Zone
             // Invalid Zone
             default:
                 return false;
                 // File type incompatible. Please save the image in .jpg, .png or .gif
         }
         $this->iWidth = imagesx($this->rImage);
         $this->iHeight = imagesy($this->rImage);
         // Automatic resizing if the image is too large
         if ($this->iWidth > $this->iMaxWidth or $this->iHeight > $this->iMaxHeight) {
             $this->dynamicResize($this->iMaxWidth, $this->iMaxHeight);
         }
         return true;
     }
 }
开发者ID:huangciyin,项目名称:pH7-Social-Dating-CMS,代码行数:52,代码来源:Image.class.php


示例11: process

 /**
  * 记录异常处理日志
  *
  * @param Exception $e
  * @param string $msg
  * @return boolean
  */
 public static function process($e, $msg, $sqlInfo = array())
 {
     $msg .= "\n";
     if ($sqlInfo) {
         $msg .= self::_sqlInfoToString($sqlInfo) . "\n";
     }
     $msg .= $e->getMessage() . "\n";
     foreach ($e->getTrace() as $key => $trace) {
         if (!isset($trace['file']) && !isset($trace['line'])) {
             continue;
         }
         $msg .= $key + 1 . ' File:' . $trace['file'] . ' Line:' . $trace['line'] . "\n";
     }
     if (isDebug()) {
         throw new self($msg);
     }
 }
开发者ID:645248882,项目名称:CocoPHP,代码行数:24,代码来源:Exception.php


示例12: validate

 /**
  * @desc Image Validate.
  * @return boolean
  * @throws \PH7\Framework\Error\CException\PH7BadMethodCallException If the image file is not found.
  */
 public function validate()
 {
     if (!is_file($this->sFile)) {
         if (isDebug()) {
             throw new \PH7\Framework\Error\CException\PH7BadMethodCallException('Image file not found: The image file \'' . $this->sFile . '\' could not be found.');
         } else {
             return false;
         }
     } else {
         $this->aInfo = getimagesize($this->sFile);
         switch ($this->aInfo[2]) {
             // JPG
             case self::JPG:
                 $this->rImage = imagecreatefromjpeg($this->sFile);
                 $this->sType = 'jpg';
                 break;
                 // PNG
             // PNG
             case self::PNG:
                 $this->rImage = imagecreatefrompng($this->sFile);
                 $this->sType = 'png';
                 break;
                 // GIF
             // GIF
             case self::GIF:
                 $this->rImage = imagecreatefromgif($this->sFile);
                 $this->sType = 'gif';
                 break;
                 // Invalid Zone
             // Invalid Zone
             default:
                 return false;
                 // File type incompatible. Please save the image in .jpg, .png or .gif
         }
         $this->iWidth = imagesx($this->rImage);
         $this->iHeight = imagesy($this->rImage);
         // Automatic resizing if the image is too large
         if ($this->iWidth > $this->iMaxWidth or $this->iHeight > $this->iMaxHeight) {
             $this->dynamicResize($this->iMaxWidth, $this->iMaxHeight);
         }
         return true;
     }
 }
开发者ID:nsrau,项目名称:pH7-Social-Dating-CMS,代码行数:48,代码来源:Image.class.php


示例13: getPage

function getPage($url)
{
    debug($url, 'json');
    $ch = curl_init($url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_HEADER, 0);
    curl_setopt($ch, CURLOPT_TIMEOUT, 90);
    curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.5 Safari/537.17");
    $page = curl_exec($ch);
    if (curl_errno($ch)) {
        echo '<font color=red> Database temporarily unavailable: ';
        echo curl_errno($ch) . ' ' . curl_error($ch);
        if (isDebug()) {
            echo $url;
        }
        echo '</font><br>';
    }
    curl_close($ch);
    debug(print_r($page, true), 'json');
    return $page;
}
开发者ID:availabs,项目名称:gtfsr2siri,代码行数:21,代码来源:common-net.inc.php


示例14: i18n_r

    }
}
echo '</div>';
if ($allowcreatefolder) {
    echo '<div id="new-folder">
      			<a href="#" id="createfolder">' . i18n_r('CREATE_FOLDER') . '</a>
				<form action="upload.php">&nbsp;<input type="hidden" name="path" value="' . $subPath . '" />
					<input type="hidden" name="nonce" value="' . get_nonce("createfolder") . '" />
					<input type="text" class="text" name="newfolder" id="foldername" /> 
					<input type="submit" class="submit" value="' . i18n_r('CREATE_FOLDER') . '" />&nbsp; 
					<a href="#" class="cancel">' . i18n_r('CANCEL') . '</a>
				</form>
			</div>';
}
echo '</div>';
$showperms = $isUnixHost && isDebug() && function_exists('posix_getpwuid');
echo '<table class="highlight" id="imageTable"><thead>';
echo '<tr><th class="imgthumb" ></th><th>' . i18n_r('FILE_NAME') . '</th>';
echo '<th class="file_size right">' . i18n_r('FILE_SIZE') . '</th>';
if ($showperms) {
    echo '<th class="file_perms right">' . i18n_r('PERMS') . '</th>';
}
echo '<th class="file_date right">' . i18n_r('DATE') . '</th>';
echo '<th class="file_actions"><!-- actions --></th></tr>';
echo '</thead><tbody>';
if (count($dirsSorted) != 0) {
    $foldercount = 0;
    // show folders
    foreach ($dirsSorted as $upload) {
        # check to see if folder is empty
        $directory_delete = null;
开发者ID:HelgeSverre,项目名称:GetSimpleCMS,代码行数:31,代码来源:upload.php


示例15: setBackground

 /**
  * Set a background on user profile.
  *
  * @param integer $iProfileId
  * @param string $sUsername
  * @param string $sFile
  * @param integer $iApproved (1 = approved 0 = pending) Default 1
  * @return boolean TRUE if succes, FALSE if the extension is wrong.
  */
 public function setBackground($iProfileId, $sUsername, $sFile, $iApproved = 1)
 {
     /**
      * This can cause minor errors (eg if a user sent a file that is not a photo).
      * So we hide the errors if we are not in development mode.
      */
     if (!isDebug()) {
         error_reporting(0);
     }
     $oWallpaper = new Framework\Image\Image($sFile, 600, 800);
     if (!$oWallpaper->validate()) {
         return false;
     }
     // We removes the old background if it exists and we delete the cache at the same time.
     $this->deleteBackground($iProfileId, $sUsername);
     $sPath = PH7_PATH_PUBLIC_DATA_SYS_MOD . 'user/background/img/' . $sUsername . PH7_SH;
     (new File())->createDir($sPath);
     $sFileName = Various::genRnd($oWallpaper->getFileName(), 1);
     $sFile = $sFileName . '.' . $oWallpaper->getExt();
     // Add the profile background
     (new UserCoreModel())->addBackground($iProfileId, $sFile, $iApproved);
     // Saved the new background
     $oWallpaper->save($sPath . $sFile);
     unset($oWallpaper);
     return true;
 }
开发者ID:huangciyin,项目名称:pH7-Social-Dating-CMS,代码行数:35,代码来源:UserCore.php


示例16: array

 * GetSimple API Handler
 *
 * @package GetSimple
 * @subpackage API
 */
include 'inc/common.php';
include 'inc/api.class.php';
#step 1 - check for post
if (empty($_POST)) {
    exit;
}
if (!getDef('GSEXTAPI', true)) {
    exit;
}
// disable libxml error output
if (!isDebug()) {
    libxml_use_internal_errors(true);
}
// disable entity loading to avoid xxe
libxml_disable_entity_loader();
#step 1 - check post for data
if (!isset($_POST['data'])) {
    $message = array('status' => 'error', 'message' => i18n_r('API_ERR_MISSINGPARAM'));
    echo json_encode($message);
    exit;
}
#step 2 - setup request
$in = simplexml_load_string($_POST['data'], 'SimpleXMLExtended', LIBXML_NOCDATA);
$request = new API_Request();
$request->add_data($in);
#step 3 - verify a compatible method was provided
开发者ID:hatasu,项目名称:appdroid,代码行数:31,代码来源:api.php


示例17: _check

 private function _check()
 {
     if (!AdminCore::auth()) {
         // It rechecks if the administrator is always connected
         $this->_aErrors[] = t('You must be logged in as administrator to upgrade your site.');
     }
     if (DbConfig::getSetting('siteStatus') !== DbConfig::MAINTENANCE_SITE) {
         $this->_aErrors[] = t('Your site must be in maintenance mode to begin the upgrade.');
     }
     if (!isDebug()) {
         $this->_aErrors[] = t('You must put your site in development mode in order to launch the upgrade of your site!') . '<br />' . t('1) Please change the permission of the ~%0% file for writing for all groups (0666 in octal).', PH7_PATH_APP_CONFIG . PH7_CONFIG_FILE) . '<br />' . t('2) Edit ~%0% file and find the code:', PH7_PATH_APP_CONFIG . PH7_CONFIG_FILE) . '<br />' . '"<code>environment = production ; production or development</code>"<br />' . t('and replace it with the code:') . '<br />' . '"<code>environment = development ; production or development</code>"<br />' . t('3) After installation, please edit ~%0% file and find the code:', PH7_PATH_APP_CONFIG . PH7_CONFIG_FILE) . '<br />' . '"<code>environment = development ; production or development</code>"<br />' . t('and replace it with the code:') . '<br />' . '"<code>environment = production ; production or development</code>"<br />' . t('4) Change the permission of the file to write only for users and reading for the other groups (0644 in octal).');
     }
 }
开发者ID:huangciyin,项目名称:pH7-Social-Dating-CMS,代码行数:13,代码来源:UpgradeCoreFile.php


示例18: __autoload

/**
 * @param String $name
 * @throws Exception
 */
function __autoload($name)
{
    $found = FALSE;
    if (isDebug()) {
        echo "Document Root:" . $_SERVER['DOCUMENT_ROOT'] . "<br/>";
        if (defined('__BASE_URL__')) {
            echo "Base URL:" . __BASE_URL__ . "<br/>";
        }
    }
    $baseDir = dirname(dirname(__FILE__));
    if (isDebug()) {
        echo 'dir:' . $baseDir . "<br/>";
    }
    // 	if (defined('__BASE_URL__')){
    // 		$parts=explode("/", __BASE_URL__,4);
    // 	 if (count($parts)<4){
    // 		  $classPath = $_SERVER['DOCUMENT_ROOT']."/oxygen-webhelp/resources/php/classes/";
    //     }else{
    //       $classPath = $_SERVER['DOCUMENT_ROOT']."/".$parts[3]."/oxygen-webhelp/resources/php/classes/";
    //     }
    // 	}else{
    $classPath = $baseDir . "/php/classes/";
    // 	}
    if (isDebug()) {
        echo 'classPath:' . $classPath . "<br/>";
    }
    $directory = $classPath;
    $path = $classPath . $name . ".php";
    if (file_exists($path)) {
        require_once $path;
        $found = TRUE;
    } else {
        $found = loadClassFromDir($classPath, $name);
    }
    if (!$found) {
        echo "Can not load {$name} from {$classPath}" . "<br/>\n";
        throw new Exception("Unable to load {$name}.");
    }
}
开发者ID:phoenix-mossimo,项目名称:BTS-Manual,代码行数:43,代码来源:init.php


示例19: notFound

 /**
  * This method has two different behavior compared to the mode site.
  * 1. In production mode: Displays the page not found using the system module "error".
  * 2. In development mode: It throws an Exception with displaying an explanatory message that indicates why this page was not found.
  *
  * @access private
  * @param string $sMsg
  * @param string $iRedirect 1 = redirect
  * @return void
  * @throws \PH7\Framework\Error\CException\PH7Exception If the site is in development mode, displays an explanatory message that indicates why this page was not found.
  */
 private function notFound($sMsg = null, $iRedirect = null)
 {
     if (isDebug() && !empty($sMsg)) {
         throw new \PH7\Framework\Error\CException\PH7Exception($sMsg);
     } else {
         if (empty($iRedirect)) {
             $this->oRegistry->module = 'error';
         } else {
             \PH7\Framework\Url\Header::redirect(UriRoute::get('error', 'http', 'index'));
         }
     }
 }
开发者ID:revcozmo,项目名称:pH7-Social-Dating-CMS,代码行数:23,代码来源:FrontController.class.php


示例20: exec_action

}
?>
	
	<?php 
exec_action("files-sidebar");
?>

<?php 
if (!getDef('GSNOUPLOADIFY', true)) {
    ?>
	
	<li class="upload" id="sb_uploadify" >
		<div id="uploadify"></div>
	<?php 
    // create Uploadify uploader
    $debug = isDebug() ? 'true' : 'false';
    $fileSizeLimit = toBytes(ini_get('upload_max_filesize')) / 1024;
    echo "\n\t<script type=\"text/javascript\">\n\tjQuery(document).ready(function() {\n\t\tif(jQuery().uploadify) {\n\t\t\$('#uploadify').uploadify({\n\t\t\t'debug'\t\t\t: " . $debug . ",\n\t\t\t'buttonText'\t: '" . i18n_r('UPLOADIFY_BUTTON') . "',\n\t\t\t'buttonCursor'\t: 'pointer',\n\t\t\t'uploader'\t\t: 'upload-uploadify.php',\n\t\t\t'swf'\t\t\t: 'template/js/uploadify/uploadify.swf',\n\t\t\t'multi'\t\t\t: true,\n\t\t\t'auto'\t\t\t: true,\n\t\t\t'height'\t\t: '25',\n\t\t\t'width'\t\t\t: '100%',\n\t\t\t'requeueErrors'\t: false,\n\t\t\t'fileSizeLimit'\t: '" . $fileSizeLimit . "', // expects input in kb\n\t\t\t'cancelImage'\t: 'template/images/cancel.png',\n\t\t\t'checkExisting'\t: 'uploadify-check-exists.php?path=" . $path . "',\n\t\t\t'postData'\t\t: {\n\t\t\t'sessionHash' : '" . $SESSIONHASH . "',\n\t\t\t'path' : '" . $path . "'\n\t\t\t},\n\t\t\tonUploadProgress: function() {\n\t\t\t\t\$('#loader').show();\n\t\t\t},\n\t\t\tonUploadComplete: function() {\n\t\t\t\t\$('#loader').fadeOut(500);\n\t\t\t\t\$('#maincontent').load(location.href+' #maincontent > *');\n\t\t\t},\n\t\t\tonSelectError: function(file,errorCode,errorMsg) {\n\t\t\t\tnotifyError('<strong>Uploadify:</strong> ' + file.name + ' <br/>Error ' + errorCode +':'+errorMsg).popit().removeit();\n\t\t\t},\n\t\t\tonUploadSuccess: function(file,data,response) {\t\n\t\t\t\tif(data != 1){\n\t\t\t\t\tnotifyError('<strong>Uploadify:</strong>' + data + ' ('+file.name+')').popit().removeit();\n\t\t\t\t\tjQuery('#' + file.id).addClass('uploadifyError');\n\t\t\t\t\tjQuery('#' + file.id).find('.uploadifyProgressBar').css('width','1px');\n\t\t\t\t\tjQuery('#' + file.id).find('.data').html(' - ' + 'Failed');\t\t\t\t\t\n\t\t\t\t}\t \n\t\t\t},\t\t\t\t\n\t\t\tonUploadError: function(file,errorCode,errorMsg, errorString) {\n\t\t\t\tnotifyError('<strong>Uploadify:</strong> ' + errorMsg).popit().removeit();\n\t\t\t}\n\t\t});\n\t\t}\n\t});\n\t</script>";
    ?>
	</li>
<?php 
}
?>
	<li style="float:right;" id="sb_filesize" ><small><?php 
i18n('MAX_FILE_SIZE');
?>
: <strong><?php 
echo toBytes(ini_get('upload_max_filesize')) / 1024 / 1024;
?>
MB</strong></small></li>
</ul>
开发者ID:elephantcode,项目名称:elephantcode,代码行数:31,代码来源:sidebar-files.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP isDisabled函数代码示例发布时间:2022-05-15
下一篇:
PHP isDate函数代码示例发布时间: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