Home  >  Article  >  Backend Development  >  Fatal error Solution to Fatal error that occurs when writing PHP paging

Fatal error Solution to Fatal error that occurs when writing PHP paging

WBOY
WBOYOriginal
2016-07-29 08:44:511489browse

Fatal error: Cannot redeclare htmtocode() (previously declared in D:www_localmytestconn.php:7) in D:www_localmytestconn.php on line 10
This error message appears when writing the paging file page.php
Google translates the meaning of this sentence It's "Fatal error: cannot redeclare htmtocode()"
The code on line 10 is

//Connect to the database
include("conn.php");
//Introduce the paging class File
include("page.class.php");
?>
After searching on the Internet, the possible reason is: two page program files are referenced and cause conflicts when they are loaded repeatedly in the memory.
Solution: Use include_once() instead of include

The above has introduced the solution to the fatal error that occurs when writing PHP paging, including the content of fatal errors. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn