Questions about the Zend Studio software warning.

Source: Internet
Author: User
There's no problem with the code running, but there's a little yellow warning in Zend Studio, and you know how to block the warning with this software?


Reply to discussion (solution)

Warning What?

Window->preference->php->code Analyzer set various warning error prompts on the right ...
Yellow warning remind you to pay attention to the place or write code is not rigorous, for you to write code useful harmless, why to block it

Window->preference->php->code Analyzer set various warning error prompts on the right ...
Yellow warning remind you to pay attention to the place or write code is not rigorous, for you to write code useful harmless, why to block it


Some warnings are correct, can be changed, but some warnings are not changed, such as the application of other variables in the file, because it is not defined on this page, it will show a warning that it could not find it, but it can run normally. The most annoying thing to refer to other pages of the class is, because not in this page instantiation, when calling a method to warn, a page down too many warnings. But when I write with other software, I don't have these warnings.

For example, the following problems occur
I have a configuration file such as conn.php.

There is $a = 50; (Just for example)!

Let me make a judgment in another index.php file,

Include ' conn.php ';

echo $a;
At this time Zend Studio 7.1 prompted me to empty the variable, Undefined variable ' $a '
But it still works 50, but the warning is strange.

I know what you're saying. If your program is developed as a project in Zend Studio, it will intelligently correlate all the files of the entire project, judging whether the variables, functions, and instances are legal, otherwise it will not be ' IDE '.
There are too many warnings in your program, mostly using Zend Studio as a simple editor, you can create a new project and try to get the program in.

If you can, build the project.

For example, the following problems occur
I have a configuration file such as conn.php.

There is $a = 50; (Just for example)!

Let me make a judgment in another index.php file,

Include ' conn.php ';

echo $a;
At this time Zend Studio 7.1 prompted me to empty the variable, Undefined variable ' $a '
But the normal operation of 50, but the warning is strange ...

Of course you can also set a warning level without even warning

How to build a project Ah, I'm just a file. New PHP Project

Ignore, you can

Window > Preference > General > Editors > Annotations > Warnings to the right to cancel all.

For example, the following problems occur
I have a configuration file such as conn.php.

There is $a = 50; (Just for example)!

Let me make a judgment in another index.php file,

Include ' conn.php ';

echo $a;
At this time Zend Studio 7.1 prompted me to empty the variable, Undefined variable ' $a '
But it still works 50, but the warning is strange.





Write $ A In the file you're going to use. Global $a.
  • 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.