How to quickly check whether the website has installed ZendOptimizer

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

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.