本文整理汇总了PHP中GO::scriptCanBeDecoded方法的典型用法代码示例。如果您正苦于以下问题:PHP GO::scriptCanBeDecoded方法的具体用法?PHP GO::scriptCanBeDecoded怎么用?PHP GO::scriptCanBeDecoded使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GO
的用法示例。
在下文中一共展示了GO::scriptCanBeDecoded方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: isAvailable
public function isAvailable()
{
if (!\GO::scriptCanBeDecoded($this->package())) {
return false;
} else {
return true;
}
// if we can run this file without ioncube it must be open source.
// if(!function_exists('ioncube_file_is_encoded') || !ioncube_file_is_encoded()){
// return true;
// }
/*if(!GO::user()){
return true;
}
$className = get_class($this);
$classParts = explode('\\', $className);
if(!License::userHasModule(GO::user()->username, strtolower($classParts[1]))){
return false;
}
return true;*/
}
示例2: actionInstall
protected function actionInstall()
{
//license check done in a separate request because it can't be done in one run
if (!\GO::scriptCanBeDecoded()) {
throw new Exception("The license file you provided didn't work. Please contact Intermesh about this error.");
} else {
//add all users to the modules they have access too
\GO\Professional\License::autoConfigureModulePermissions();
echo json_encode(array('success' => true));
}
}
示例3: test_system
//.........这里部分代码省略.........
$ze1compat = ini_get('zend.ze1_compatibility_mode');
$test['name'] = 'zend.ze1_compatibility_mode';
$test['showSuccessFeedback'] = false;
$test['pass'] = empty($ze1compat);
$test['feedback'] = 'Fatal error: zend.ze1_compatibility_mode is enabled. ' . $product_name . ' can\'t run with this setting enabled';
$test['fatal'] = true;
$tests[] = $test;
$url = "http" . (!empty($_SERVER['HTTPS']) ? "s" : "") . "://" . $_SERVER['HTTP_HOST'];
$headers = @get_headers($url . '/caldav');
$test['name'] = 'CalDAV alias';
$test['showSuccessFeedback'] = false;
$test['pass'] = $headers && (strpos($headers[0], '401') !== false || strpos($headers[0], '200') !== false);
$test['feedback'] = "Note: The alias /caldav was not detected. Please create: Alias /caldav /groupoffice/modules/caldav/calendar.php.";
$test['fatal'] = false;
$tests[] = $test;
$headers = @get_headers($url . '/.well-known/caldav');
$test['name'] = 'CalDAV autodiscovery';
$test['showSuccessFeedback'] = false;
$test['pass'] = $headers && (strpos($headers[0], '301') !== false || strpos($headers[0], '200') !== false);
$test['feedback'] = "Note: The redirect /.well-known/caldav was not detected. Please create a redirect: Redirect 301 /.well-known/caldav /caldav";
$test['fatal'] = false;
$tests[] = $test;
$headers = @get_headers($url . '/carddav');
$test['name'] = 'CardDAV alias';
$test['showSuccessFeedback'] = false;
$test['pass'] = $headers && (strpos($headers[0], '401') !== false || strpos($headers[0], '200') !== false);
$test['feedback'] = "Note: The alias /carddav was not detected. Please create: Alias /carddav /groupoffice/modules/carddav/addressbook.php.";
$test['fatal'] = false;
$tests[] = $test;
$headers = @get_headers($url . '/.well-known/carddav');
$test['name'] = 'CardDAV autodiscovery';
$test['showSuccessFeedback'] = false;
$test['pass'] = $headers && (strpos($headers[0], '301') !== false || strpos($headers[0], '200') !== false);
$test['feedback'] = "Note: The redirect /.well-known/carddav was not detected. Please create a redirect: Redirect 301 /.well-known/carddav /carddav";
$test['fatal'] = false;
$tests[] = $test;
$headers = @get_headers($url . '/Microsoft-Server-ActiveSync');
// var_dump($headers);
$test['name'] = 'Microsoft-Server-ActiveSync alias';
$test['showSuccessFeedback'] = false;
$test['pass'] = $headers && (strpos($headers[0], '401') !== false || strpos($headers[0], '200') !== false);
$test['feedback'] = "Note: The alias /Microsoft-Server-ActiveSync was not detected. Please create: Alias /Microsoft-Server-ActiveSync /groupoffice/modules/z-push/index.php.";
$test['fatal'] = false;
$tests[] = $test;
$test['name'] = 'Shared Memory Functions';
$test['showSuccessFeedback'] = false;
$test['pass'] = function_exists('sem_get') && function_exists('shm_attach') && function_exists('sem_acquire') && function_exists('shm_get_var');
$test['feedback'] = "InterProcessData::InitSharedMem(): PHP libraries for the use shared memory are not available. Z-push will work unreliably!";
$test['fatal'] = false;
$tests[] = $test;
$test['name'] = 'Process Control Extensions';
$test['showSuccessFeedback'] = false;
$test['pass'] = function_exists('posix_getuid');
$test['feedback'] = "Process Control Extensions PHP library not avaialble. Z-push will work unreliably!";
$test['fatal'] = false;
$tests[] = $test;
if (class_exists('GO')) {
// $test['name']='Writable license file';
// $test['pass']=GO::getLicenseFile()->exists() && GO::getLicenseFile()->isWritable();
// $test['feedback']="Fatal: the license file ".GO::getLicenseFile()->path()." is not writable. Please make it writable for the webserver.";
// $test['fatal']=true;
//
// $tests[]=$test;
$root = dirname(dirname(__FILE__));
if ($ioncubeWorks && is_dir($root . '/modules/professional')) {
$test['name'] = 'Professional license';
$test['showSuccessFeedback'] = false;
// if(!file_exists(GO::config()->root_path.'groupoffice-pro-'.\GO::config()->getMajorVersion().'-license.txt')){
// $test['feedback']='Warning: There\'s no license file "groupoffice-pro-'.\GO::config()->getMajorVersion().'-license.txt" in the root of Group-Office. The professional modules will not be enabled.';
// $test['fatal']=false;
// $test['pass']=false;
// }else
if (!\GO::scriptCanBeDecoded('Professional')) {
$test['feedback'] = 'Warning: Your professional license is invalid. The professional modules will not be enabled. Please contact Intermesh about this problem and supply the output of this page.';
$test['fatal'] = false;
$test['pass'] = false;
} else {
$test['feedback'] = '';
$test['fatal'] = false;
$test['pass'] = true;
}
$tests[] = $test;
}
if (\GO::isInstalled()) {
$test['name'] = 'Protected files path';
$test['showSuccessFeedback'] = false;
$test['pass'] = is_writable(\GO::config()->file_storage_path);
$test['feedback'] = 'Fatal error: the file_storage_path setting in config.php is not writable. You must correct this or ' . $product_name . ' will not run.';
$test['fatal'] = false;
$tests[] = $test;
$test['name'] = 'Cronjob';
$test['showSuccessFeedback'] = false;
$test['pass'] = GO::cronIsRunning();
$test['feedback'] = "Warning: The main cron job doesn't appear to be running. Please add a cron job: \n\n* * * * * www-data php " . \GO::config()->root_path . "groupofficecli.php -c=" . \GO::config()->get_config_file() . " -r=core/cron/run -q > /dev/null";
$test['fatal'] = false;
$tests[] = $test;
}
}
return $tests;
}