How to quickly check whether the website has installed ZendOptimizer? I want to use a program to determine whether to load Zend encrypted files if zend Optimizer is installed. It is not loaded if it is not installed. The website cannot be accessed. How can I quickly detect it using a program?
Reply to discussion (solution)
Obtain the string returned by the phpinfo function and find the "Zend Optimizer" character. (if you forget this, open phpinfo to check it)
$ ZendOptimizer = false; include 'test. php'; if ($ ZendOptimizer) {// Zend Optimizer} else {// no Zend Optimizer}
Test. php
$ZendOptimizer = true;
Compilation is required.
$ ZendOptimizer = false; include 'test. php'; if ($ ZendOptimizer) {// Zend Optimizer} else {// no Zend Optimizer}
Test. php
$ZendOptimizer = true;
Compilation is required.
In this case, test. php is something that zend has encrypted, right? That is to say, the file has been loaded before you judge. That is to say, if the user does not install zend, the page cannot be run and the page is displayed blank. Then the meaning of judgment is lost.
Obtain the string returned by the phpinfo function and find the "Zend Optimizer" character. (if you forget this, open phpinfo to check it)
This way, the performance consumption is not big? Dare not use.
Yes? Give me a try.
Yes? Give me a try.
If (extension_loaded ('zend Optimizer ') | extension_loaded ('zend Guard Loader') | get_assist_var ("zend_extension") | get_assist_var ("zend_optimizer.optimization_level ") | get_cfg_var ("zend_extension_manager.optimizer_ts") | get_exten_var ("zend_extension_ts ")){
} Else {
If (version_compare (phpversion (), "5.3", "<= ")){
Exit ('Install Zend Optimizer v3.3.0 or later. if the prompt is incorrect, open \ source \ plugin \ robots \ check manually. php file, find the corresponding prompt, delete that line. ');
} Else {
Exit ('Install Zend Guard Loader v3.3.0 or later. if the prompt is incorrect, open \ source \ plugin \ robots \ check manually. php file, find the corresponding prompt, delete that line. ');
}
}
If (extension_loaded ('zend Optimizer ') | extension_loaded ('zend Guard Loader') | get_assist_var ("zend_extension") | get_assist_var ("zend_optimizer.optimization_level ") | get_cfg_var ("extensions") | get_cfg_var ("zend_extension_ts") {} else {if (version_compare (phpversion (), "5.3", "<= ")) {exit ('Install Zend Optimizer v3.3.0 or later. if the prompt is incorrect, open \ source \ plugin \ robots \ check manually. php file, find the corresponding prompt, delete that line. ');} else {exit (' Please install Zend Guard Loader v3.3.0 or later. if the prompt is incorrect, open \ source \ plugin \ robots \ check manually. php file, find the corresponding prompt, delete that line. ');}}