Home > Article > Backend Development > Use case management platform maintenance records, use case management platform maintenance_PHP tutorial
work requires maintaining a use case management platform, mainly to optimize individual function points. This platform saves test cases for each project in each period, as well as use case query, management, review and other functions.
First build a simulated online environment locally. xampp php mysql, copy the platform source code files to the xampp/htdocs/ directory. Open the browser and visit: http://localhost/xxx/xxx.php to access the local simulation environment.
Optimization point 1: Delete invalid js, css, etc. that cause the resource waiting time to be too long.
Solution: Use browser F12 to check the warning items of network connection timeout and no resource return, locate the position of the resource request statement in the source code, comment it out, and the problem is solved.
Optimization point 2: The function of replying to use case review emails is invalid.
Solution: To avoid suspicion, the problem will not be described in detail. Here are some key points in the solution process:
1) The local php version should be newer than the online version, resulting in a local error under the same source code:
Fatal error: Call-time pass-by-reference has been removed in D:Program Filesxampphtdocsxxxxxxxxx.php on line xx
The cause of the problem should be: the writing syntax of reference parameters is different between different versions of PHP. Reference: here
New version of php, when defining functions:
<span>function myFunc<span>(<span>&<span>$arg<span>) <span>{ <span>do something<span>... <span>}</span></span></span></span></span></span></span></span></span>
When the function is called:
myFunc<span>(<span>$var<span>)<span>;<span>//Call myFunc</span></span></span></span></span>
That is, when calling the new version of php function, there is no & before the parameter.