I want to use the program to determine if installing Zend Optimizer environment will load Zend encrypted files. If it is not installed, it is not loaded. Not make the site inaccessible. How can I use the program to detect quickly?
Reply to discussion (solution)
Gets the string returned by the Phpinfo function, looking for the "Zend Optimizer" character (specifically not so forgotten, can open phpinfo look down)
$ZendOptimizer = False;include ' test.php ', if ($ZendOptimizer) { //has Zend Optimizer}else { //no Zend Optimizer}
test.php
$ZendOptimizer = true;
Of course we're compiling.
$ZendOptimizer = False;include ' test.php ', if ($ZendOptimizer) { //has Zend Optimizer}else { //no Zend Optimizer}
test.php
$ZendOptimizer = true;
Of course we're compiling.
You're doing this, test.php is Zend's encrypted stuff, right? This means that the file has been loaded before you can tell. In other words, if the user does not install Zend, the page can not be run display blank. Then you lose the sense of judgment.
Gets the string returned by the Phpinfo function, looking for the "Zend Optimizer" character (specifically not so forgotten, can open phpinfo look down)
This is possible, performance consumption is not big? Dare not use.
Is it? You get me a try.
Is it? You get me a try.
if (extension_loaded (' Zend Optimizer ') | | extension_loaded (' Zend Guard Loader ') | | Get_cfg_var ("zend_extension") | | Get_cfg_var ("Zend_optimizer.optimization_level") | | Get_cfg_var ("Zend_extension_manager.optimizer_ts") | | Get_cfg_var ("Zend_extension_ts")) {
}else{
if (Version_compare (Phpversion (), "5.3", "<=")) {
Exit (' Please install Zend Optimizer v3.3.0 or later. If the prompt is incorrect, open the \source\plugin\robots\check.php file manually, find the corresponding prompt, and delete the line. ');
} else {
Exit (' Please install Zend Guard Loader v3.3.0 or later. If the prompt is incorrect, open the \source\plugin\robots\check.php file manually, find the corresponding prompt, and delete the line. ');
}
}
if (extension_loaded (' Zend Optimizer ') | | extension_loaded (' Zend Guard Loader ') | | Get_cfg_var ("zend_extension") | | Get_cfg_var ("Zend_optimizer.optimization_level") | | Get_cfg_var ("Zend_extension_manager.optimizer_ts") | | Get_cfg_var ("Zend_extension_ts")) {}else{if (Version_compare (Phpversion (), "5.3", "<=")) {exit (' Please install Zend Optimizer v3.3.0 or later. If the prompt is incorrect, open the \source\plugin\robots\check.php file manually, find the corresponding prompt, and delete the line. '); else {exit (' Install Zend Guard Loader v3.3.0 or later. If the prompt is incorrect, open the \source\plugin\robots\check.php file manually, find the corresponding prompt, and delete the line. ');}}