In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article introduces the relevant knowledge of "how to solve php define error problem". In the actual case operation process, many people will encounter such difficulties. Next, let Xiaobian lead you to learn how to deal with these situations! I hope you can read carefully and learn something!
php define error because it is wrong to make constants case-insensitive by defining true, the solution is to discard true as the third argument to define().
Operating environment: Windows 7 system, PHP7.1 version, DELL G3 computer
How to fix php define error?
define() method defines true and returns an error
In PHP, we can usually define constants using the define() method, and we can also define whether constants are case-sensitive by defining the third variable as true or false, for example
define('WEB','555',true);echo web; //555echo WEB; //555
But when I finished editing and running it, I didn't get the results I wanted, and the results were as follows.
In the second and third lines, respectively, errors are reported, but the results of the operation can be seen. I will translate the prompt content of the error:
deprecated: define (): case-insensitive constant declaration deprecated
Disrecommended: Case-insensitive constants are not recommended. The correct case for this constant is " WEB".
We also found that there was no error in the fourth line of code.
Obviously we made a mistake by defining true to make constants case-insensitive, because case-insensitive constants were deprecated in PHP 7.3,
PHP 7.3: deprecate true as the third argument to define().
"How to solve php define error" content introduced here, thank you for reading. If you want to know more about industry-related knowledge, you can pay attention to the website. Xiaobian will output more high-quality practical articles for everyone!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.