PHP single file implementation MySQL backup export SQL database code

 PHP single file implementation MySQL backup export SQL database code
Single file can realize backup of MySQL database and generate.Sql suffix. There is no need to log in phpMyAdmin, export data, php //, backup database $T_Host = "localhost"; / / database address $user = "; / / database account $password ="; / / database password $dbname = "; / / database name / / / here, the account number, password, and name are all if (mysql_connect ($host, $user, $user)) / if from the page" / / connection database database {".

PHP+MySQL simple database paging display example code message board Pagination

 PHP+MySQL simple database paging display example code message board Pagination
< php /** * a simple PHP database paging code, the author: love dust */ $page=$_GET['page']; / / accept the address transmitted variables, $page indicates the number of pages to page, indicates the number of pages $T_Host= "localhost"; $T_Host= / localhost / / database IP $user= "root"; / / database user name $password= "11111"; / / database password $db= " $db="; / / data table name "(") "," "", "" "" ("unable to connect server"); / / connection database.

PHP prohibits direct access to web pages

 PHP prohibits direct access to web pages
Generally speaking, for some important documents, we do not want users to enter the address directly. For this, we need to set some settings. Here are some ways to prevent PHP from accessing the.PHP file pages directly from browsers. The first way is to create a new a.php file. The contents are as follows: php $fromurl= http://dcoet.com/; / / jump to this address. If ($_SERVER['HTTP_REFERER'] = = "") / {/ / judge whether the previous page is empty. $_SERVER['HTTP_REFERER'] can get the previous page of the current page.
Copyright, old madman reserves all rights.

User login

Share to: