本文整理汇总了PHP中CheckPHPVersion函数的典型用法代码示例。如果您正苦于以下问题:PHP CheckPHPVersion函数的具体用法?PHP CheckPHPVersion怎么用?PHP CheckPHPVersion使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了CheckPHPVersion函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: dirname
4. The Software shall not be published, propagated, distributed, sublicensed, and/or sold without expressed permission from the City of Courtenay.
Indemnity
You agree to indemnify and hold harmless the authors of the Software and any contributors for any direct, indirect, incidental, or consequential third-party claims,
actions or suits, as well as any related expenses, liabilities, damages, settlements or fees arising from your use or misuse of the Software, or a violation of any terms of this license.
Disclaimer of Warranty
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF QUALITY, PERFORMANCE, NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
Limitations of Liability
YOU ASSUME ALL RISK ASSOCIATED WITH THE INSTALLATION AND USE OF THE SOFTWARE.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS OF THE SOFTWARE BE LIABLE FOR CLAIMS, DAMAGES OR OTHER LIABILITY ARISING FROM, OUT OF, OR IN CONNECTION WITH THE SOFTWARE.
LICENSE HOLDERS ARE SOLELY RESPONSIBLE FOR DETERMINING THE APPROPRIATENESS OF USE AND ASSUME ALL RISKS ASSOCIATED WITH ITS USE,
INCLUDING BUT NOT LIMITED TO THE RISKS OF PROGRAM ERRORS, DAMAGE TO EQUIPMENT, LOSS OF DATA OR SOFTWARE PROGRAMS, OR UNAVAILABILITY OR INTERRUPTION OF OPERATIONS.
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*/
include_once dirname(__FILE__) . '/' . 'components/utils/check_utils.php';
CheckPHPVersion();
CheckTemplatesCacheFolderIsExistsAndWritable();
include_once dirname(__FILE__) . '/' . 'app_settings.php';
include_once dirname(__FILE__) . '/' . 'database_engine/mysql_engine.php';
include_once dirname(__FILE__) . '/' . 'components/page.php';
include_once dirname(__FILE__) . '/' . 'authorization.php';
function GetConnectionOptions()
{
$result = GetGlobalConnectionOptions();
$result['client_encoding'] = 'utf8';
GetApplication()->GetUserAuthorizationStrategy()->ApplyIdentityToConnectionOptions($result);
return $result;
}
// OnGlobalBeforePageExecute event handler
// OnBeforePageExecute event handler
class total_allocated_hours_smallPage extends Page
示例2: LibXml2IsBuggy
return true;
}
/** Detect if the user's PHP/LibXML is affected by the following bug: -
* http://bugs.php.net/bug.php?id=45996
*/
function LibXml2IsBuggy()
{
global $libxml2_test_query;
$libxml2_test_query = '';
$testxml = '<xml><libxml2_test_query>select 'a'</libxml2_test_query></xml>';
GetDetailsFromPostedXML($testxml);
if (strcasecmp($libxml2_test_query, 'select a') == 0) {
//This PHP/LibXML is buggy!
return true;
}
//Not buggy!
return false;
}
/* we can now use SQLyogTunnel.php to log debug informations, which will help us to point out the error */
function WriteLog($loginfo)
{
if (defined("DEBUG")) {
$fp = fopen("yogtunnel.log", "a");
if ($fp == FALSE) {
return;
}
fwrite($fp, $loginfo . "\r\n");
// MY_CHANGE: Because below it was
// printing 'Enter' instead of new line
fclose($fp);
}
}
function WriteLogTemp($loginfo)
{
if (defined("DEBUG")) {
$fp = fopen("sabya.log", "a");
if ($fp == FALSE) {
return;
}
fwrite($fp, $loginfo . "\r\n");
// MY_CHANGE: Because below it was
// printing 'Enter' instead of new line
fclose($fp);
}
}
/* Process the query*/
function ProcessQuery()
{
WriteLog("Enter processquery");
if (CheckPHPVersion() == FALSE) {
/* now the call can be of three types
1.) Specific to check tunnel version
2.) Normal where it is expected that the PHP page is 4.3.0
3.) From browser
We check this by checking the query string which is sent if just a check is done by SQLyog */
WriteLog("CheckPHPVersion is FALSE");
if (isset($_GET['app'])) {
echo tunnelversionstring;
echo phpversionerror;
} else {
WriteLog("CheckPHPVersion is FALSE and app query string not set");
ShowAccessError();
}
return;
}
/* in special case, sqlyog just sends garbage data with query string to check for tunnel version. we need to process that now */
if (isset($_GET['app'])) {
WriteLog("app query string not set");
echo tunnelversionstring;
echo tunnelversion;
return;
}
/* Starting from 5.1 BETA 4, we dont get the data as URL encoded POST data, we just get it as raw data */
WriteLog("Trying to get php://input");
$xmlrecvd = file_get_contents("php://input");
WriteLog("Got php://input!");
示例3: _phpErrorHandler
if ($minorC > $minorR) {
return true;
}
if ($minorC < $minorR) {
return false;
}
// and same minor
if ($editC >= $editR) {
return true;
}
return true;
}
//
// Make sure PHP version is high enough
//
if (!CheckPHPVersion(MIN_PHPVERSION)) {
JpGraphError::RaiseL(13, PHP_VERSION, MIN_PHPVERSION);
die;
}
//
// Make GD sanity check
//
if (!function_exists("imagetypes") || !function_exists('imagecreatefromstring')) {
JpGraphError::RaiseL(25001);
//("This PHP installation is not configured with the GD library. Please recompile PHP with GD support to run JpGraph. (Neither function imagetypes() nor imagecreatefromstring() does exist)");
}
//
// Setup PHP error handler
//
function _phpErrorHandler($errno, $errmsg, $filename, $linenum, $vars)
{
示例4: ProcessQuery
function ProcessQuery()
{
global $tunnelversion;
global $tunnelversionstring;
global $phpversionerror;
WriteLog("Enter processquery");
if (CheckPHPVersion() == FALSE) {
/* now the call can be of three types
1.) Specific to check tunnel version
2.) Normal where it is expected that the PHP page is 4.3.0
3.) From browser
We check this by checking the query string which is sent if just a check is done by SQLyog */
if (isset($_GET['app'])) {
echo $tunnelversionstring;
echo $phpversionerror;
} else {
ShowAccessError();
}
return;
}
/* in special case, sqlyog just sends garbage data with query string to check for tunnel version. we need to process that now */
if (isset($_GET['app'])) {
echo $tunnelversionstring;
echo $tunnelversion;
return;
}
/* Starting from 5.1 BETA 4, we dont get the data as URL encoded POST data, we just get it as raw data */
$xmlrecvd = file_get_contents("php://input");
/* Check whether the page is called from the browser */
if (strlen($xmlrecvd) == 0) {
ShowAccessError();
return;
}
WriteLog($xmlrecvd);
global $host;
global $port;
global $username;
global $pwd;
global $db;
global $batch;
global $query;
global $base;
$ret = GetDetailsFromPostedXML($xmlrecvd);
if ($ret == FALSE) {
return;
}
/* connect to the mysql server */
WriteLog("Trying to connect");
$mysql = mysql_connect("{$host}:{$port}", $username, $pwd);
if (!$mysql) {
HandleError(mysql_errno(), mysql_error());
WriteLog(mysql_error());
return;
}
WriteLog("Connected");
mysql_select_db(str_replace('`', '', $db), $mysql);
/* Function will execute setnames in the server as it does in SQLyog client */
SetName($mysql);
/* set sql_mode to zero */
SetNonStrictMode($mysql);
if ($batch) {
ExecuteBatchQuery($mysql, $query);
} else {
ExecuteSingleQuery($mysql, $query);
}
mysql_close($mysql);
WriteLog("Exit processquery");
}