Home > Article > Backend Development > Why does the browser spin endlessly in a ci project?
I heard that CI is ranked very high in the global PHP framework, ranking first and second, so I planned to learn it. However, when I was learning, I found that as long as I wrote a little wrong code and refreshed the project, the browser would be infinite. I was spinning around in circles, feeling very depressed. It stands to reason that it would be easy to tell the problem and report an error. In the end, this happened too often and I was no longer in the mood to continue using it.
Until today, I got a copy of someone else's code, written in ci, and the result was an infinite circle. After half an hour of spinning, no error was reported. Is there something wrong with my ci installation? Are there any special installation techniques for ci?
The problem has been solved. I used to use php5.5, but now I have upgraded it to 5.6, and I have enabled date.timezone = PRC in
php.ini and that’s it. I don’t know if it’s just a php configuration problem, anyway. Now you can see the error. After solving the error, you can successfully run other people’s projects
Until today, I got a copy of someone else's code, written in ci, and the result was an infinite circle. After half an hour of spinning, no error was reported. Is there something wrong with my ci installation? Are there any special installation techniques for ci?
date.timezone = PRC in php.ini
. That’s it. I don’t know if it’s just a php configuration problem, anyway. Now you can see the error. After solving the error, you can successfully run other people’s projects
It has nothing to do with the framework. It should be a problem with your program logic. The page is forced to open and an error is reported. See what the situation is. It is either an infinite loop or the resource cannot be loaded.
Forced error code:
<code>error_reporting(E_ALL); ini_set('display_errors','On');</code>
I guess you must have just used it, but I have never used CI. In fact, you can look at Laravel or something, and I have tried tp5 and it seems to be okay
Enable error reporting
It’s not necessarily a CI problem. If you take someone else’s project, it’s possible that someone else’s project has loaded resources from their own domain. If you build a local environment and run it, it will become cross-domain. Generally speaking, there is still the possibility of front-end errors. Relatively big
When this kind of problem occurs, as a developer, it seems that from any angle, you should know how to test it:
ENVIRONMENT in the index.php file, modify this to change the error level)
F12Open debugging window,
networkTrack response
For example, method 1 of a certain controller is loaded by default, method 1 redirects to method 2, and then redirects back to method 1,,, it’s an endless loop