The previous period of time to reinstall the system, later said that it is to use PHP, re-build the environment of Apache+php+mysql, because before the construction of many times, feel very easy to build, and then write the following common test environment code:
1
PHP23phpinfo(); 4 5 ?>
Then normal output, feel the environment is not a problem, no tube ...
Recently, running the previous project code (using the CI framework) has always shown a blank page with no correct output.
It's embarrassing ...
Write your own simple PHP statement can run normally, it seems that the environment is not a problem.
It was not until the date () function was used that a hint of the clue was found.
Warning:date (): It is not safe for rely on the system ' s timezone settings. You is *required* to use the Date.timezone setting or the Date_default_timezone_set () function. In case you used any of those methods and you is still getting this warning, your most likely misspelled the timezone Iden Tifier. 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
Well, the information that is configured in the php.ini file does not take effect
The first thought is that the server is not reading this php.ini configuration file, because previously encountered Wamp did not delete, and then reconfigure the environment, there is more than one php.ini file in the system, read the history of the configuration file.
Find system files, only one php.ini file, and re-install the system, even if it has not been.
Check again for phpinfo ();
The read is really the php.ini I am configuring now
Then the problem may be that the php.ini file has not been correctly parsed.
I tried to use the PHP code to connect to the database, and found that the relevant function could not find ...
There seems to be a problem with php.ini.
Check your modified configuration carefully, no problem ...
Check again, there is no problem ...
......
......
Then, to the point of walking every day, decided not to get, really not all deleted, re-build the environment, shut down the computer, go downstairs for a walk, and then make a phone call to spit Groove today's "Happy" life ...
After the walk back, not reconciled, or to understand, or not sleep ...
Then, do not give up the last time to check the php.ini, finally let me catch this bug
Configuration extension in the directory, the missing half of the quotation marks, resulting in the subsequent parsing is problematic, so the time zone is configured, access to the database is not correct.
Add the upper half of the quotes, restart the Apache service, OK, everything is running so good
To sum up: carelessness is not advisable ...
The above describes the PHP learning note 8--side quotes caused by the problem, including the aspects of the content, I hope the PHP tutorial interested in a friend helpful.