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.