Self -
PHP
In the process encountered some problems, may be the problem will have common sense errors, please forgive me! Thank you!
Title, there are the following test cases
a.php
b.php
But in this case, there will be a warning in Zend Studio Undefined variable '$msg'
, although not affecting the results of the operation, but for post-maintenance or other people's reading will have an impact, so I would like to ask what is the best way to solve this "obsessive-compulsive disorder" problem? Can you let Zend Studio not report this warning?
See the typecho
source process to see the following statement, located in
/usr/themes/default/404.php
need('header.php'); ?> 404 -
need('footer.php'); ?>
How does that typecho
make use $this
need
of access?
I have noticed that the typecho
theme template is used $this
to use the provided plug-in or function, and what is the principle?
Reply content:
The PHP
process of self-study encountered some problems, there may be common sense errors, please forgive me! Thank you!
Title, there are the following test cases
a.php
b.php
But in this case, there will be a warning in Zend Studio Undefined variable '$msg'
, although not affecting the results of the operation, but for post-maintenance or other people's reading will have an impact, so I would like to ask what is the best way to solve this "obsessive-compulsive disorder" problem? Can you let Zend Studio not report this warning?
See the typecho
source process to see the following statement, located in
/usr/themes/default/404.php
need('header.php'); ?> 404 -
need('footer.php'); ?>
How does that typecho
make use $this
need
of access?
I have noticed that the typecho
theme template is used $this
to use the provided plug-in or function, and what is the principle?
Do not use a bare global variable to wrap it into a class.
A template is a method include of an object that has this variable within its scope $this
.