PHP off MySQL Script

Source: Internet
Author: User

<?PHP$SQL _server= "xxxxxx:3306";$SQL _user= "XXXX";$SQL _name= "XXXX";$SQL _pass= "xxxxxxxx";//Configure Database Information$conn[Email protected]mysql_connect($SQL _server,$SQL _user,$SQL _pass);if($conn==FALSE) {    Echo"Database connection Error!<br>"; Exit(); }if(@mysql_select_db($SQL _name,$conn)==FALSE) {        Echo"Open database:".$SQL _name. "Failed!"; Exit(); }mysql_query("Set names ' UTF8 '");$sql= "SELECT * from ' zluc_members ' where ' uid ' between".$_get["a"]. " and ".$_get["B"]. "";//Configure table Name field name$c=mysql_query($sql); while($result=Mysql_fetch_array($c)){foreach($result  as $key=$val) {if(Is_numeric($key)) {unset($result[$key]); } }file_put_contents('/home/www/uc/uc/data/all.txt ',implode(‘ ‘,$result)." \ n ", file_append);//to configure a writable path}?>
How to use: Shell. php?a=0&b=10000 the data in the UID 0 to 10,000, and writes it back to the All.txt   : Shell. php?a=10001&b=20000 the  data from UID 10,000 to 20,000 is exported, and after continuing to write All.txt  , you just download all.txt.

PHP off MySQL Script

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.