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 //, $T_, backup database Host = "localhost"; / / database address $user = "; / / database account $password ="; / / database password $dbname = "; / / database name / / / here, the account number, password, and name are all if (mysql_) transmitted from the page. Connect ($host, $user, $password) / / connect mysql database {echo echo > database connection failed. Please check and try again.

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, author: love dust */ $page=$_ GET['page']; / / accept the address passed by variables, $page indicates the number of pages to page, indicates the number of pages that users browse, $T_ Host= "localhost"; / / database's IP $user= "root"; / / database user name $password= "11111"; / / database password $db= "under"; / / data table name @$con=mysql_ Connect ("$host", "$user", "$password") or die ('unable to connect to server'); / / connect database mysql_ Select_ ...

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 method: the new a.php file is as follows: "php $fromurl=" Http://dcoet.com/ "/ / jump to this address. (if) ($) SERVER['HTTP_ REFERER'] = = "" {/ / judge whether the previous page is empty. $5 SERVER['HTTP_ REFERER'] can get the previous page of the current page.
Copyright, old madman reserves all rights.

User login

Share to: