How to quickly detect if a website is installed Zend Optimizer

Source: Internet
Author: User
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. ');}}
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.