Where are the codes for the conn.php and functions.php files?
为爱走天涯
为爱走天涯 2018-04-12 17:39:53
0
2
1975

<?php

 require_once('conn.php'); //连接数据库

 require_once('functions.php');

 $sql = "SELECT * FROM news order by id desc";

 $info = mysql_query($sql); 

?>


为爱走天涯
为爱走天涯

reply all(2)
phpcn_u83868

<?php

$servername = "localhost";

$username = "root";

$password = "root";


// Create connection

$conn = mysqli_connect($servername, $username, $password);

mysqli_set_charset($conn, 'utf8' );

mysql_select_db("article");

// Detect connection

if (!$conn) {

die("Connection failed: " . mysqli_connect_error());

}

//echo "Connection successful";

?>

The above is the content of conn.php

functions.php I don’t know what it is. I just started learning and haven’t figured out what this file is supposed to do

sky

If it is not a framework, it will be in the same directory.

There is also a problem with your database link

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template