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

PHP getErrorMessage函数代码示例

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

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



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

示例1: connect

 public function connect($config = [])
 {
     $this->config = $config;
     $dsn = 'host=' . $this->config['host'] . ' ';
     if (!empty($this->config['port'])) {
         $dsn .= 'port=' . $this->config['port'] . ' ';
     }
     if (!empty($this->config['database'])) {
         $dsn .= 'dbname=' . $this->config['database'] . ' ';
     }
     if (!empty($this->config['user'])) {
         $dsn .= 'user=' . $this->config['user'] . ' ';
     }
     if (!empty($this->config['password'])) {
         $dsn .= 'password=' . $this->config['password'] . ' ';
     }
     if (!empty($this->config['dsn'])) {
         $dsn = $this->config['dsn'];
     }
     $dsn = rtrim($dsn);
     $this->connect = $this->config['pconnect'] === true ? @pg_pconnect($dsn) : @pg_connect($dsn);
     if (empty($this->connect)) {
         die(getErrorMessage('Database', 'connectError'));
     }
     if (!empty($this->config['charset'])) {
         pg_set_client_encoding($this->connect, $this->config['charset']);
     }
 }
开发者ID:znframework,项目名称:znframework,代码行数:28,代码来源:Postgres.php


示例2: connect

 public function connect(array $settings = NULL)
 {
     $config = \Config::get('IndividualStructures', 'cache')['driverSettings'];
     $config = !empty($settings) ? $settings : $config['redis'];
     $this->redis = new \Redis();
     try {
         if ($config['socketType'] === 'unix') {
             $success = $this->redis->connect($config['socket']);
         } else {
             $success = $this->redis->connect($config['host'], $config['port'], $config['timeout']);
         }
         if (empty($success)) {
             die(getErrorMessage('IndividualStructures', 'cache:connectionRefused', 'Connection'));
         }
     } catch (RedisException $e) {
         die(getErrorMessage('IndividualStructures', 'cache:connectionRefused', $e->getMessage()));
     }
     if (isset($config['password'])) {
         if (!$this->redis->auth($config['password'])) {
             die(getErrorMessage('IndividualStructures', 'cache:authenticationFailed'));
         }
     }
     $serialized = $this->redis->sMembers('ZNRedisSerialized');
     if (!empty($serialized)) {
         $this->serialized = array_flip($serialized);
     }
     return true;
 }
开发者ID:znframework,项目名称:znframework,代码行数:28,代码来源:Redis.php


示例3: __construct

 public function __construct()
 {
     if (!isPhpVersion('5.5.0')) {
         die(getErrorMessage('Error', 'invalidVersion', ['%' => 'password_', '#' => '5.5.0']));
     }
     parent::__construct();
 }
开发者ID:znframework,项目名称:znframework,代码行数:7,代码来源:Phash.php


示例4: run

 public static function run()
 {
     // INI AYARLAR YAPILANDIRILIYOR...
     $iniSet = Config::get('Ini', 'settings');
     if (!empty($iniSet)) {
         Config::iniSet($iniSet);
     }
     // ----------------------------------------------------------------------
     // HTACCESS DOSYASI OLUŞTURULUYOR...
     if (Config::get('Htaccess', 'createFile') === true) {
         createHtaccessFile();
     }
     // ----------------------------------------------------------------------
     // COMPOSER DOSYASI OLUŞTURULUYOR...
     $composer = Config::get('Composer', 'autoload');
     if ($composer === true) {
         $path = 'vendor/autoload.php';
         if (file_exists($path)) {
             require_once $path;
         } else {
             report('Error', getMessage('Error', 'fileNotFound', $path), 'AutoloadComposer');
             die(getErrorMessage('Error', 'fileNotFound', $path));
         }
     } elseif (file_exists($composer)) {
         require_once $composer;
     } elseif (!empty($composer)) {
         report('Error', getMessage('Error', 'fileNotFound', $composer), 'AutoloadComposer');
         die(getErrorMessage('Error', 'fileNotFound', $composer));
     }
     // ----------------------------------------------------------------------
 }
开发者ID:Allopa,项目名称:ZN-Framework-Starter,代码行数:31,代码来源:Starting.php


示例5: connect

 public function connect($config = array())
 {
     $this->config = $config;
     $this->connect = $this->config['pconnect'] === true ? @sqlite_popen($this->config['database'], 0666, $error) : @sqlite_open($this->config['database'], 0666, $error);
     if (!empty($error)) {
         die(getErrorMessage('Database', 'mysqlConnectError'));
     }
 }
开发者ID:Allopa,项目名称:ZN-Framework-Starter,代码行数:8,代码来源:SqliteDriver.php


示例6: connect

 public function connect($config = array())
 {
     $this->config = $config;
     $this->connect = $this->config['pconnect'] === true ? @ibase_pconnect($this->config['host'] . ':' . $this->config['database'], $this->config['user'], $this->config['password'], $this->config['charset']) : @ibase_connect($this->config['host'] . ':' . $this->config['database'], $this->config['user'], $this->config['password'], $this->config['charset']);
     if (empty($this->connect)) {
         die(getErrorMessage('Database', 'mysqlConnectError'));
     }
 }
开发者ID:bytemtek,项目名称:znframework,代码行数:8,代码来源:Ibase.php


示例7: connect

 public function connect($config = array())
 {
     $this->config = $config;
     $this->connect = empty($this->config['user']) ? @cubrid_connect($this->config['host'], $this->config['port'], $this->config['database']) : @cubrid_connect($this->config['host'], $this->config['port'], $this->config['database'], $this->config['user'], $this->config['password']);
     if (empty($this->connect)) {
         die(getErrorMessage('Database', 'mysqlConnectError'));
     }
 }
开发者ID:bytemtek,项目名称:znframework,代码行数:8,代码来源:Cubrid.php


示例8: connect

 public function connect($config = array())
 {
     $this->config = $config;
     $this->connect = $this->config['pconnect'] === true ? @fbsql_pconnect($this->config['host'], $this->config['user'], $this->config['password']) : @fbsql_connect($this->config['host'], $this->config['user'], $this->config['password']);
     if (empty($this->connect)) {
         die(getErrorMessage('Database', 'mysqlConnectError'));
     }
     fbsql_select_db($this->config['database'], $this->connect);
 }
开发者ID:Allopa,项目名称:ZN-Framework-Starter,代码行数:9,代码来源:FbsqlDriver.php


示例9: connect

 public function connect($config = array())
 {
     $this->config = $config;
     try {
         $this->connect = !empty($this->config['password']) ? new SQLite3($this->config['database'], SQLITE3_OPEN_READWRITE | SQLITE3_OPEN_CREATE, $this->config['password']) : new SQLite3($this->config['database']);
     } catch (Exception $e) {
         die(getErrorMessage('Database', 'mysqlConnectError'));
     }
 }
开发者ID:bytemtek,项目名称:znframework,代码行数:9,代码来源:Sqlite3.php


示例10: connect

 public function connect($config = array())
 {
     $this->config = $config;
     $dsn = !empty($this->config['dsn']) ? $this->config['dsn'] : 'DRIVER=' . $this->config['host'] . ';SERVER=' . $this->config['server'] . ';DATABASE=' . $this->config['database'];
     $this->connect = $this->config['pconnect'] === true ? @odbc_pconnect($dsn, $this->config['user'], $this->config['password']) : @odbc_connect($dsn, $this->config['user'], $this->config['password']);
     if (empty($this->connect)) {
         die(getErrorMessage('Database', 'mysqlConnectError'));
     }
 }
开发者ID:Allopa,项目名称:ZN-Framework-Starter,代码行数:9,代码来源:OdbcDriver.php


示例11: connect

 public function connect(array $settings = NULL)
 {
     $config = \Config::get('IndividualStructures', 'cache')['driverSettings'];
     $config = !empty($settings) ? $settings : $config['memcache'];
     $connect = @memcache_add_server($config['host'], $config['port'], $config['weight']);
     if (empty($connect)) {
         die(getErrorMessage('IndividualStructures', 'cache:unsupported', 'Memcache'));
     }
     return true;
 }
开发者ID:znframework,项目名称:znframework,代码行数:10,代码来源:Memcache.php


示例12: deleteCategoryById

function deleteCategoryById($id)
{
    $app = \Slim\Slim::getInstance();
    try {
        $app->response->write(json_encode(CategoriesDAO::delete($id)));
        return json_encode($app->response->getBody());
    } catch (Exception $e) {
        $app->response->setStatus(404);
        $app->response->setBody(getErrorMessage($e));
        return json_encode($app->response->getBody());
    }
}
开发者ID:AppliedSoftwareManagement-Team8,项目名称:ss-category-service,代码行数:12,代码来源:index.php


示例13: _is

 protected function _is($type, $file)
 {
     $file = $this->rpath($file);
     $validType = $this->methods[$type] ?? NULL;
     if (!function_exists($validType) || $validType === NULL) {
         die(getErrorMessage('Error', 'undefinedFunction', Classes::onlyName(get_called_class()) . '::' . $type . '()'));
     }
     if ($validType($file)) {
         return true;
     }
     return false;
 }
开发者ID:znframework,项目名称:znframework,代码行数:12,代码来源:Info.php


示例14: run

 public function run($library = '', $driver = '')
 {
     $config = Config::get(ucwords(strtolower($library)));
     $driver = !empty($driver) ? $driver : $config['driver'];
     if (!empty($driver)) {
         $drv = ucwords($driver) . 'Driver';
         $var = new $drv();
         return $var;
     } else {
         die(getErrorMessage('Error', 'driverError', $driver));
     }
 }
开发者ID:bytemtek,项目名称:znframework,代码行数:12,代码来源:Driver.php


示例15: connect

 public function connect($config = array())
 {
     $this->config = $config;
     $server = !empty($this->config['server']) ? $this->config['server'] : $this->config['host'];
     if (!empty($this->config['port'])) {
         $server .= ', ' . $this->config['port'];
     }
     $connection = array('UID' => $this->config['user'], 'PWD' => $this->config['password'], 'Database' => $this->config['database'], 'ConnectionPooling' => 0, 'CharacterSet' => $this->config['charset'], 'Encrypt' => $this->config['encode'], 'ReturnDatesAsStrings' => 1);
     $this->connect = @sqlsrv_connect($server, $connection);
     if (empty($this->connect)) {
         die(getErrorMessage('Database', 'mysqlConnectError'));
     }
 }
开发者ID:Allopa,项目名称:ZN-Framework-Starter,代码行数:13,代码来源:SqlsrvDriver.php


示例16: connect

 public function connect($config = [])
 {
     $this->config = $config;
     $dsn = !empty($this->config['dsn']) ? $this->config['dsn'] : $this->config['host'];
     if ($this->config['pconnect'] === true) {
         $this->connect = empty($this->config['charset']) ? @oci_pconnect($this->config['user'], $this->config['password'], $dsn) : @oci_pconnect($this->config['user'], $this->config['password'], $dsn, $this->config['charset']);
     } else {
         $this->connect = empty($this->config['charset']) ? @oci_connect($this->config['user'], $this->config['password'], $dsn) : @oci_connect($this->config['user'], $this->config['password'], $dsn, $this->config['charset']);
     }
     if (empty($this->connect)) {
         die(getErrorMessage('Database', 'connectError'));
     }
 }
开发者ID:znframework,项目名称:znframework,代码行数:13,代码来源:Oracle.php


示例17: levelOneProcess

function levelOneProcess($input)
{
    //get the input form the previous step
    if ($input['latest_message'] == 1) {
        $reply = getSafaricomMenu();
    } elseif ($input['latest_message'] == 2) {
        //MPESA menu
        $reply = getMpesaMenu();
    } else {
        $reply = getErrorMessage();
        echo "END " . $reply;
        exit;
    }
    return $reply;
}
开发者ID:bqevin,项目名称:kuhustle-ussd,代码行数:15,代码来源:multi_levels.php


示例18: getPageAccessToken

 /**
  * Uses user access token to become never-expiring page access token.
  *
  * @param  string $userToken
  *
  * @return bool|string (page access token)
  */
 private function getPageAccessToken($userToken)
 {
     $fb = initFb();
     try {
         $response = $fb->get('/' . config('crm-launcher.facebook_credentials.facebook_page_id') . '?fields=access_token', $userToken);
         $response = json_decode($response->getBody());
         if (isset($response->access_token)) {
             return $response->access_token;
         }
         getErrorMessage('login_right_account');
     } catch (Exception $e) {
         getErrorMessage('permission');
         return false;
     }
 }
开发者ID:rubenwouters,项目名称:crm-launcher,代码行数:22,代码来源:FacebookLoginController.php


示例19: uselib

function uselib(string $class, array $parameters = [])
{
    if (!class_exists($class)) {
        $classInfo = ZN\Autoloader\Autoloader::getClassFileInfo($class);
        $class = $classInfo['namespace'];
        if (!class_exists($class)) {
            die(getErrorMessage('Error', 'classError', $class));
        }
    }
    if (!isset(zn::$use->{$class})) {
        if (!is_object(zn::$use)) {
            zn::$use = new stdClass();
        }
        zn::$use->{$class} = new $class(...$parameters);
    }
    return zn::$use->{$class};
}
开发者ID:znframework,项目名称:znframework,代码行数:17,代码来源:Library.php


示例20: connect

 public function connect($config = [])
 {
     $this->config = $config;
     $this->connect = mysqli_connect($this->config['host'], $this->config['user'], $this->config['password'], $this->config['database']);
     if (empty($this->connect)) {
         die(getErrorMessage('Database', 'connectError'));
     }
     if (!empty($this->config['charset'])) {
         $this->query("SET NAMES '" . $this->config['charset'] . "'");
     }
     if (!empty($this->config['charset'])) {
         $this->query('SET CHARACTER SET ' . $this->config['charset']);
     }
     if (!empty($this->config['collation'])) {
         $this->query('SET COLLATION_CONNECTION = "' . $this->config['collation'] . '"');
     }
 }
开发者ID:znframework,项目名称:znframework,代码行数:17,代码来源:MySQLi.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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