PHP putenv function Chinese cannot use the problem

Source: Internet
Author: User
Tags phpinfo
If you know laravel can look at the above piece, if you do not know, go straight to the dividing line below;

Any of the Env items here take mail_driver as an example
Change to "my" with the ENV function can get to the value of normal;
Instead of "I" with the ENV function can not be obtained normally;

MAIL_DRIVER=我var_dump(env(MAIL_DRIVER''));  // NULLMAIL_DRIVER=我的var_dump(env(MAIL_DRIVER''));  // 我的

Some other Chinese such as "good" will also appear this situation;
Have to say, laravel and profound; study the ENV function source code;
The last problem to locate is;
-------------------------------------------------understand and don't understand the split line of the Laravel frame------------------------------------------------

putenv("PROJECT_NAME=我的");phpinfo();

Environment in phpinfo can be searched for project_name

putenv("PROJECT_NAME=我");phpinfo();

Environment in phpinfo can not be searched project_name

Ask the parents, why is this? How to set the Chinese value without obstacles?

  • Related Article

    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.