Php learning Note 8-questions caused by half quotation marks, learning Note 8-half quotation marks. Php study Note 8-questions caused by half-side quotation marks, learning Note 8-the system was reinstalled some time ago with half-side quotation marks and php was used again later, the apache + php + mysql environment has been re-built, which is caused by php study Note 8-questions caused by half quotation marks, learning Note 8-half quotation marks
I re-installed the system some time ago. later I said that I had to use php again, and I had to re-set up the apache + php + mysql environment. as I have already set up the environment many times before, I felt very easy and it was very soon completed, then I wrote the following code for the common test environment:
1
Then, the output is normal, and the environment is okay ......
Recently I used it. running the previous project code (using the CI framework) always shows a blank page without any correct output.
Sorry ......
If you re-write a simple php statement on your own, it seems that the environment is okay.
It was not until the date () function was used that there was a clue.
Warning: date (): It is not safe to rely on the system's timezone settings. you are * required * to use the date. timezone setting or the date_default_timezone_set () function. in case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. we selected the timezone 'utc' for now, but please set date. timezone to select your timezone.
However, I have already configured date. timezone = Asia/Shanghai in the php. ini file.
Okay, the configuration information in the php. ini file does not take effect.
The first thing that comes to mind is that the server does not read this php. ini configuration file, because the wamp has not been deleted before, and then re-configure the environment by yourself, there are more than one php in the system. the INI file reads historical configuration files.
Find the system file, there is only one php. ini file, and the system is reinstalled, even if there is no such file.
View phpinfo () again ();
Reading is indeed my current php. ini configuration.
The problem may be that the php. ini file is not correctly parsed.
I tried to use the php code to connect to the database and found that the relevant functions could not be found ......
It seems that php. ini does have a problem.
Check your modified configurations carefully. there is no problem ......
Check again, but there is still no problem ......
......
......
Then, after walking every day, I decided not to do it. I could not delete it all, re-set up the environment, shut down the computer, and go downstairs for a walk, then I made a phone call to talk about today's "happy" life ......
When I come back from the walk, I still want to figure it out, or I can't sleep ......
Then, I checked php. ini for the last time and finally caught the bug.
When you configure the directory where the extension is located, a half quotation mark is missing, resulting in a problem in subsequent parsing. Therefore, you cannot configure the time zone and access the database correctly.
Add quotation marks and restart the apache service. OK. everything works so well.
Conclusion: be careless ......
The hacker reinstalled the system some time ago. later, he said that he had to use php again. then he rebuilt the apache + php + mysql environment...