Php 神秘号码卡在缓存中?
当我第一次运行我的代码时,它运行得很好,上传了两条不同编号的测试记录。 我把它放了一两天,现在当我上传测试数据时,它只输入了我输入的第一个数字,in。那个记录被删除了Php 神秘号码卡在缓存中?,php,mysql,Php,Mysql,当我第一次运行我的代码时,它运行得很好,上传了两条不同编号的测试记录。 我把它放了一两天,现在当我上传测试数据时,它只输入了我输入的第一个数字,in。那个记录被删除了 <?php require_once('auth.php'); require_once('config.php'); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://ww
<?php
require_once('auth.php');
require_once('config.php');
?>
<!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=iso-8859-1" />
<title>Member Index</title>
<link href="loginmodule.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/subnav.js"></script>
</head>
<body>
<h1>Welcome <?php echo $_SESSION['SESS_FIRST_NAME'];?></h1>
<a href="member-profile.php">My Profile</a> | <a href="logout.php">Logout</a>
<p>Welcome to the TPC Holdings SMS Campaign Builder</p>
<p></p>
<ul class="topnav">
<li><a href="#">Home</a></li>
<li>
<a href="#">Tutorials</a>
<ul class="subnav">
<li><a href="#">Sub Nav Link</a></li>
<li><a href="#">Sub Nav Link</a></li>
</ul>
</li>
<li>
<a href="#">Resources</a>
<ul class="subnav">
<li><a href="#">Sub Nav Link</a></li>
<li><a href="#">Sub Nav Link</a></li>
</ul>
</li>
<li><a href="#">About Us</a></li>
<li><a href="#">Submit</a></li>
<li><a href="#">Contact Us</a></li>
</ul>
<p></p>
<p>View your stats</p>
<p>Change your ip</p>
<p>Pay your bill</p>
<form enctype="multipart/form-data" method="POST">
<input name="userfile" type="file">
<input type="submit" value="Upload">
</form>
<?php
$dsn = "mysql:host=$host;port=$port;dbname=$dbname"; //Data Source Name = Mysql
$db = new PDO($dsn, $db_username, $db_password); //Connect to DB
$do = $db->prepare("insert into customer_list values(?,?,?,?)");
$csv_file = $_FILES['userfile']['tmp_name'];
if ( ! is_file( $csv_file ) )
exit('File not found.');
if (($handle = fopen($csv_file, "r")) !== FALSE) {
while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) {
$do->execute($data);
//var_dump($data);
}
fclose($handle);
}
exit( "Complete!" );
?>
</body>
</html>
*****************************************************
mysql>
desc customer_list
-> ;
+---------------+-------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+---------------+-------------+------+-----+---------+----------------+
| id | smallint(6) | NO | PRI | NULL | auto_increment |
| contact_first | char(30) | YES | | NULL | |
| contact_last | char(30) | YES | | NULL | |
| sms_num | int(10) | YES | | NULL | |
+---------------+-------------+------+-----+---------+----------------+
4 rows in set (0.00 sec)
mysql> `SELECT * FROM customer_list WHERE id=id;`
+----+---------------+---------------+------------+
| id | contact_first | contact_last | sms_num |
+----+---------------+---------------+------------+
| 57 | mary | lamb | 2147483647 |
| 56 | joe | shmoe | 2122223344 |
| 55 | contact_first | contact_last | 0 |
+----+---------------+---------------+------------+
3 rows in set (0.00 sec)
mysql>
mysql>
mysql> `SELECT * FROM customer_list WHERE id=id;`
+----+---------------+--------------+------------+
| id | contact_first | contact_last | sms_num |
+----+---------------+--------------+------------+
| 64 | blow | me | 2147483647 |
| 63 | jack | ass | 2147483647 |
| 62 | mary | lamb | 2147483647 |
+----+---------------+--------------+------------+
3 rows in set (0.00 sec)
成员索引
欢迎
|
欢迎来到TPC控股SMS活动生成器
-
-
查看你的统计数据
更改您的ip地址
付账
*****************************************************
mysql>
描述客户列表
-> ;
+---------------+-------------+------+-----+---------+----------------+
|字段|类型|空|键|默认|额外|
+---------------+-------------+------+-----+---------+----------------+
|id | smallint(6)| NO | PRI | NULL |自动增量|
|首先联系| char(30)|是| |空||
|联系您最后一个字符(30)|是| |空||
|sms|u num | int(10)| YES | | NULL ||
+---------------+-------------+------+-----+---------+----------------+
一组4行(0.00秒)
mysql>`从客户列表中选择*,其中id=id`
+----+---------------+---------------+------------+
|id |先联系|后联系|短信号码|
+----+---------------+---------------+------------+
|57 |玛丽|兰姆| 2147483647|
|56 |乔|什莫| 2122223344|
|55 |先联系|后联系| 0|
+----+---------------+---------------+------------+
一组3行(0.00秒)
mysql>
mysql>
mysql>`从客户列表中选择*,其中id=id`
+----+---------------+--------------+------------+
|id |先联系|后联系|短信号码|
+----+---------------+--------------+------------+
|64 |吹|我| 2147483647|
|63 |杰克|驴| 2147483647|
|62 |玛丽|兰姆| 2147483647|
+----+---------------+--------------+------------+
一组3行(0.00秒)
正在上载的数据 ,玛丽,兰姆,3457890000 杰克,驴,77763412
,blow,me,8008883232你有什么错误吗?您可以发布有关系统当前行为的更多详细信息吗?如果您回显$\u文件['userfile']['tmp\u name'],您是否获得了预期的值?如果您在该位置检查文件,您是否获得了预期的文件内容?