search

Home  >  Q&A  >  body text

I have checked that the entire site has not been redefined. Why does it still show that function conts() is redefined?

There are no problems with the encapsulated tests. When called on other pages, an error message always appears. Function conts() is redefined.

Fatal error: Cannot redeclare conts() (previously declared in Where did it come from Is there a problem? Does anyone know?

function MySQLModel(){ $link = null; function conts(){ // include 'conn.php'; // $link = mysqli_connect (HOST,USER,PASS,DBNAME) or die('Prompt: Database connection failed!'); define("HOST","localhost"); //Host name define("USER","root"); // Account define("PASS","root"); //Password define("DBNAME","datas"); //Database name $link = mysqli_connect(HOST,USER,PASS,DBNAME) or die('Prompt: Database Connection failed!'); return $link; } $link = conts();

岸上鱼岸上鱼1145 days ago988

reply all(0)I'll reply

No reply
  • Cancelreply