From svnnotify @ sourceforge.jp Mon Apr 11 23:20:18 2011
From: svnnotify @ sourceforge.jp (svnnotify @ sourceforge.jp)
Date: Mon, 11 Apr 2011 23:20:18 +0900
Subject: [Smartupload-svn] [1]
Message-ID: <1302531618.179798.28009.nullmailer@users.sourceforge.jp>
Revision: 1
http://sourceforge.jp/projects/smartupload/svn/view?view=rev&revision=1
Author: hryksbt
Date: 2011-04-11 23:20:17 +0900 (Mon, 11 Apr 2011)
Log Message:
-----------
Added Paths:
-----------
trunk/
trunk/Documents/
trunk/Documents/proposal/
trunk/Documents/proposal/DigitalContentsUp&Down.ppt
-------------- next part --------------
Added: trunk/Documents/proposal/DigitalContentsUp&Down.ppt
===================================================================
(Binary files differ)
Property changes on: trunk/Documents/proposal/DigitalContentsUp&Down.ppt
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
From svnnotify @ sourceforge.jp Sun Apr 17 08:56:00 2011
From: svnnotify @ sourceforge.jp (svnnotify @ sourceforge.jp)
Date: Sun, 17 Apr 2011 08:56:00 +0900
Subject: [Smartupload-svn] [2]
Message-ID: <1302998160.235988.26049.nullmailer@users.sourceforge.jp>
Revision: 2
http://sourceforge.jp/projects/smartupload/svn/view?view=rev&revision=2
Author: hryksbt
Date: 2011-04-17 08:55:59 +0900 (Sun, 17 Apr 2011)
Log Message:
-----------
Added Paths:
-----------
trunk/SmartUpload/
trunk/SmartUpload/.buildpath
trunk/SmartUpload/.project
trunk/SmartUpload/.settings/
trunk/SmartUpload/.settings/org.eclipse.php.core.prefs
trunk/SmartUpload/data/
trunk/SmartUpload/data/06c69f2a.jpg
trunk/SmartUpload/include/
trunk/SmartUpload/include/database.php
trunk/SmartUpload/main.php
trunk/SmartUpload/upload_file.php
trunk/SmartUpload/upload_form.php
-------------- next part --------------
Added: trunk/SmartUpload/.buildpath
===================================================================
--- trunk/SmartUpload/.buildpath (rev 0)
+++ trunk/SmartUpload/.buildpath 2011-04-16 23:55:59 UTC (rev 2)
@@ -0,0 +1,5 @@
+
+
+
+
+
Added: trunk/SmartUpload/.project
===================================================================
--- trunk/SmartUpload/.project (rev 0)
+++ trunk/SmartUpload/.project 2011-04-16 23:55:59 UTC (rev 2)
@@ -0,0 +1,22 @@
+
+
+ SmartUpload
+
+
+
+
+
+ org.eclipse.wst.validation.validationbuilder
+
+
+
+
+ org.eclipse.dltk.core.scriptbuilder
+
+
+
+
+
+ org.eclipse.php.core.PHPNature
+
+
Added: trunk/SmartUpload/.settings/org.eclipse.php.core.prefs
===================================================================
--- trunk/SmartUpload/.settings/org.eclipse.php.core.prefs (rev 0)
+++ trunk/SmartUpload/.settings/org.eclipse.php.core.prefs 2011-04-16 23:55:59 UTC (rev 2)
@@ -0,0 +1,5 @@
+#Sun Apr 17 00:12:11 JST 2011
+eclipse.preferences.version=1
+include_path=0;/SmartUpload
+phpVersion=php5.3
+use_asp_tags_as_php=false
Added: trunk/SmartUpload/data/06c69f2a.jpg
===================================================================
(Binary files differ)
Property changes on: trunk/SmartUpload/data/06c69f2a.jpg
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/SmartUpload/include/database.php
===================================================================
--- trunk/SmartUpload/include/database.php (rev 0)
+++ trunk/SmartUpload/include/database.php 2011-04-16 23:55:59 UTC (rev 2)
@@ -0,0 +1,24 @@
+ "mysql",
+ "username" => "root",
+ "password" => "san59shi",
+ "hostspec" => "localhost",
+ "database" => "upload",
+ );
+ $mdb2 =& MDB2::connect( $dsn, $options );
+
+ // 文字コードの指定
+ $mdb2->setCharset( "utf8" );
+?>
\ No newline at end of file
Added: trunk/SmartUpload/main.php
===================================================================
--- trunk/SmartUpload/main.php (rev 0)
+++ trunk/SmartUpload/main.php 2011-04-16 23:55:59 UTC (rev 2)
@@ -0,0 +1,3 @@
+
\ No newline at end of file
Added: trunk/SmartUpload/upload_file.php
===================================================================
--- trunk/SmartUpload/upload_file.php (rev 0)
+++ trunk/SmartUpload/upload_file.php 2011-04-16 23:55:59 UTC (rev 2)
@@ -0,0 +1,47 @@
+
+
+
+
+SmartUpload
+
+
+ file uploader
+ $filename uploaded");
+
+ //データベースに記録
+ $sql = "INSERT INTO datainfo ( filename, uploaddate, data_size, )";
+ $sql .= "VALUES( ";
+ $sql .= "?,";
+ $sql .= "now(),";
+ $sql .= "?)";
+ $stmt = $mdb2->prepare( $sql );
+ $stmt->execute(
+ array(
+ $_REQUEST["customer_code"],
+ $_REQUEST["name"],
+ )
+ );
+ }
+
+?>
+
+
\ No newline at end of file
Added: trunk/SmartUpload/upload_form.php
===================================================================
--- trunk/SmartUpload/upload_form.php (rev 0)
+++ trunk/SmartUpload/upload_form.php 2011-04-16 23:55:59 UTC (rev 2)
@@ -0,0 +1,20 @@
+
+
+
+SmartUpload
+
+
+
+
+
From svnnotify @ sourceforge.jp Mon Apr 18 01:56:22 2011
From: svnnotify @ sourceforge.jp (svnnotify @ sourceforge.jp)
Date: Mon, 18 Apr 2011 01:56:22 +0900
Subject: [Smartupload-svn] [3]
Message-ID: <1303059382.041158.8494.nullmailer@users.sourceforge.jp>
Revision: 3
http://sourceforge.jp/projects/smartupload/svn/view?view=rev&revision=3
Author: hryksbt
Date: 2011-04-18 01:56:21 +0900 (Mon, 18 Apr 2011)
Log Message:
-----------
Modified Paths:
--------------
trunk/SmartUpload/upload_file.php
trunk/SmartUpload/upload_form.php
Added Paths:
-----------
trunk/SmartUpload/09_02_fileup.php
-------------- next part --------------
Added: trunk/SmartUpload/09_02_fileup.php
===================================================================
--- trunk/SmartUpload/09_02_fileup.php (rev 0)
+++ trunk/SmartUpload/09_02_fileup.php 2011-04-17 16:56:21 UTC (rev 3)
@@ -0,0 +1,39 @@
+
+
+
+
+
+ファイルアップローダー
+
+
+
";
+ echo "
";
+
+ //} else {
+ //echo "jpg かgif のファイルしかアップできません。或いはハイフン以外の記号があります。";
+ //}
+ } else {
+ echo "$filesize Byte ファイルサイズが大きすぎます。
100000 Byte 以下にしてください。";
+ }
+} else {
+echo "参照で画像ファイルを指定して、表示をクリック!";
+}
+?>
+
+
+
\ No newline at end of file
Modified: trunk/SmartUpload/upload_file.php
===================================================================
--- trunk/SmartUpload/upload_file.php 2011-04-16 23:55:59 UTC (rev 2)
+++ trunk/SmartUpload/upload_file.php 2011-04-17 16:56:21 UTC (rev 3)
@@ -13,33 +13,39 @@
SmartUpload
- file uploader
+ File Uploader
$filename uploaded");
+ print(" $filename is uploaded.
");
+ print("size = "."$filesize"." bytes
");
- //データベースに記録
- $sql = "INSERT INTO datainfo ( filename, uploaddate, data_size, )";
- $sql .= "VALUES( ";
- $sql .= "?,";
- $sql .= "now(),";
- $sql .= "?)";
- $stmt = $mdb2->prepare( $sql );
+ // データベースに記録
+ $sql = "INSERT INTO data_info ( filename, uploaddate, datasize )";
+ $sql .= " VALUES ( ";
+ $sql .= " ?, ";
+ $sql .= " now(), ";
+ $sql .= " ? ) ";
+
+ echo $sql."
";
+
+ $stmt=$db->prepare("$sql");
$stmt->execute(
- array(
- $_REQUEST["customer_code"],
- $_REQUEST["name"],
+ array (
+ $filename,
+ $filesize
)
);
+
}
?>
Modified: trunk/SmartUpload/upload_form.php
===================================================================
--- trunk/SmartUpload/upload_form.php 2011-04-16 23:55:59 UTC (rev 2)
+++ trunk/SmartUpload/upload_form.php 2011-04-17 16:56:21 UTC (rev 3)
@@ -7,6 +7,7 @@
*
*/
?>
+
SmartUpload
@@ -14,7 +15,7 @@
From svnnotify @ sourceforge.jp Tue Apr 19 00:46:26 2011
From: svnnotify @ sourceforge.jp (svnnotify @ sourceforge.jp)
Date: Tue, 19 Apr 2011 00:46:26 +0900
Subject: [Smartupload-svn] [4]
Message-ID: <1303141586.733263.3490.nullmailer@users.sourceforge.jp>
Revision: 4
http://sourceforge.jp/projects/smartupload/svn/view?view=rev&revision=4
Author: hryksbt
Date: 2011-04-19 00:46:26 +0900 (Tue, 19 Apr 2011)
Log Message:
-----------
Modified Paths:
--------------
trunk/SmartUpload/upload_file.php
-------------- next part --------------
Modified: trunk/SmartUpload/upload_file.php
===================================================================
--- trunk/SmartUpload/upload_file.php 2011-04-17 16:56:21 UTC (rev 3)
+++ trunk/SmartUpload/upload_file.php 2011-04-18 15:46:26 UTC (rev 4)
@@ -29,22 +29,31 @@
print(" $filename is uploaded.
");
print("size = "."$filesize"." bytes
");
+// ↓↓↓↓↓↓↓ データベース管理 ↓↓↓↓↓↓↓
+
+ //↓↓↓test↓↓↓
+ /* $conn = mysql_connect( "localhost", "root", "san59shi" );
+ mysql_set_charset("utf8");
+ mysql_select_db( "upload" );
+ */
+
+ $abc = "select * from data_info";
+ $res = "mysql_query( $abc ))";
+
+ while( $row = mysql_fetch_array($res)){
+ print( $row["filename" ]."
" );
+ print( $row["uploaddate"]."
" );
+ print( $row["data_size" ] );
+ }
+ //↑↑↑test↑↑↑
+
// データベースに記録
- $sql = "INSERT INTO data_info ( filename, uploaddate, datasize )";
- $sql .= " VALUES ( ";
- $sql .= " ?, ";
- $sql .= " now(), ";
- $sql .= " ? ) ";
+ $sql = "INSERT INTO data_info ( filename, uploaddate, data_size ) VALUES ( 'a', now(),1 ) ";
echo $sql."
";
$stmt=$db->prepare("$sql");
- $stmt->execute(
- array (
- $filename,
- $filesize
- )
- );
+ $stmt->execute( array( $filename, $filesize ) );
}
From svnnotify @ sourceforge.jp Tue Apr 19 00:47:41 2011
From: svnnotify @ sourceforge.jp (svnnotify @ sourceforge.jp)
Date: Tue, 19 Apr 2011 00:47:41 +0900
Subject: [Smartupload-svn] [5]
Message-ID: <1303141661.355820.4739.nullmailer@users.sourceforge.jp>
Revision: 5
http://sourceforge.jp/projects/smartupload/svn/view?view=rev&revision=5
Author: hryksbt
Date: 2011-04-19 00:47:41 +0900 (Tue, 19 Apr 2011)
Log Message:
-----------
Modified Paths:
--------------
trunk/SmartUpload/upload_file.php
-------------- next part --------------
Modified: trunk/SmartUpload/upload_file.php
===================================================================
--- trunk/SmartUpload/upload_file.php 2011-04-18 15:46:26 UTC (rev 4)
+++ trunk/SmartUpload/upload_file.php 2011-04-18 15:47:41 UTC (rev 5)
@@ -32,7 +32,7 @@
// ↓↓↓↓↓↓↓ データベース管理 ↓↓↓↓↓↓↓
//↓↓↓test↓↓↓
- /* $conn = mysql_connect( "localhost", "root", "san59shi" );
+ /* $conn = mysql_connect( "localhost", "root", "******" );
mysql_set_charset("utf8");
mysql_select_db( "upload" );
*/
From svnnotify @ sourceforge.jp Sun Apr 24 23:35:01 2011
From: svnnotify @ sourceforge.jp (svnnotify @ sourceforge.jp)
Date: Sun, 24 Apr 2011 23:35:01 +0900
Subject: [Smartupload-svn] [6]
Message-ID: <1303655701.200266.24963.nullmailer@users.sourceforge.jp>
Revision: 6
http://sourceforge.jp/projects/smartupload/svn/view?view=rev&revision=6
Author: hryksbt
Date: 2011-04-24 23:35:01 +0900 (Sun, 24 Apr 2011)
Log Message:
-----------
Modified Paths:
--------------
trunk/SmartUpload/include/database.php
trunk/SmartUpload/upload_file.php
Added Paths:
-----------
trunk/SmartUpload/data/aaa.jpg
trunk/SmartUpload/data/mopera.txt
trunk/SmartUpload/test.php
-------------- next part --------------
Added: trunk/SmartUpload/data/aaa.jpg
===================================================================
(Binary files differ)
Property changes on: trunk/SmartUpload/data/aaa.jpg
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/SmartUpload/data/mopera.txt
===================================================================
--- trunk/SmartUpload/data/mopera.txt (rev 0)
+++ trunk/SmartUpload/data/mopera.txt 2011-04-24 14:35:01 UTC (rev 6)
@@ -0,0 +1,16 @@
+ID: kyc6twgy
+PW: ekybutj2
+
+DNS 220.159.212.201
+DNS 220.159.212.201
+
+moperau ????+
+ID: d6uv788c
+APN: mopera.net
+PW: kaz34612
+
+151 1 4
+
+?????
+00:80:87:19:DE:1C
Property changes on: trunk/SmartUpload/data/mopera.txt
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/SmartUpload/include/database.php
===================================================================
--- trunk/SmartUpload/include/database.php 2011-04-18 15:47:41 UTC (rev 5)
+++ trunk/SmartUpload/include/database.php 2011-04-24 14:35:01 UTC (rev 6)
@@ -1,4 +1,5 @@
setCharset( "utf8" );
+*/
+
+//PDO?ф・膓?+try {
+ //DB?御・膓?+ $pdo = new PDO(
+ "mysql:host=localhost;dbname=upload","root","san59shi");
+
+} catch (PDOException $e){
+ var_dump($e->getMessage());
+}
+
+//PDO???
+$pdo = null;
+
?>
\ No newline at end of file
Added: trunk/SmartUpload/test.php
===================================================================
--- trunk/SmartUpload/test.php (rev 0)
+++ trunk/SmartUpload/test.php 2011-04-24 14:35:01 UTC (rev 6)
@@ -0,0 +1,24 @@
+query("SELECT * FROM data_info");
+
+ while($row = $stmt->fetch(PDO::FETCH_ASSOC)){
+ echo implode(", ", $row) . PHP_EOL;
+ }
+} catch (PDOException $e){
+ var_dump($e->getMessage());
+}
+
+$pdo = null;
+
+?>
\ No newline at end of file
Modified: trunk/SmartUpload/upload_file.php
===================================================================
--- trunk/SmartUpload/upload_file.php 2011-04-18 15:47:41 UTC (rev 5)
+++ trunk/SmartUpload/upload_file.php 2011-04-24 14:35:01 UTC (rev 6)
@@ -36,7 +36,7 @@
mysql_set_charset("utf8");
mysql_select_db( "upload" );
*/
-
+/*
$abc = "select * from data_info";
$res = "mysql_query( $abc ))";
@@ -45,16 +45,19 @@
print( $row["uploaddate"]."
" );
print( $row["data_size" ] );
}
+*/
//?????est?????
// ????帥??若??????+ /*
$sql = "INSERT INTO data_info ( filename, uploaddate, data_size ) VALUES ( 'a', now(),1 ) ";
+ //sql??∈茯???鴻?
echo $sql."
";
$stmt=$db->prepare("$sql");
$stmt->execute( array( $filename, $filesize ) );
-
+*/
}
?>
From svnnotify @ sourceforge.jp Sun Apr 24 23:37:16 2011
From: svnnotify @ sourceforge.jp (svnnotify @ sourceforge.jp)
Date: Sun, 24 Apr 2011 23:37:16 +0900
Subject: [Smartupload-svn] [7]
Message-ID: <1303655836.482400.28345.nullmailer@users.sourceforge.jp>
Revision: 7
http://sourceforge.jp/projects/smartupload/svn/view?view=rev&revision=7
Author: hryksbt
Date: 2011-04-24 23:37:16 +0900 (Sun, 24 Apr 2011)
Log Message:
-----------
Modified Paths:
--------------
trunk/SmartUpload/include/database.php
-------------- next part --------------
Modified: trunk/SmartUpload/include/database.php
===================================================================
--- trunk/SmartUpload/include/database.php 2011-04-24 14:35:01 UTC (rev 6)
+++ trunk/SmartUpload/include/database.php 2011-04-24 14:37:16 UTC (rev 7)
@@ -1,29 +1,5 @@
"mysql",
- "username" => "root",
- "password" => "san59shi",
- "hostspec" => "localhost",
- "database" => "upload",
- );
- $mdb2 =& MDB2::connect( $dsn, $options );
-
- // 文字コードの指定
- $mdb2->setCharset( "utf8" );
-*/
-
//PDOで接続
try {
//DBへ接続
@@ -35,6 +11,6 @@
}
//PDO切断
-$pdo = null;
+// $pdo = null;
?>
\ No newline at end of file
From svnnotify @ sourceforge.jp Mon Apr 25 00:01:15 2011
From: svnnotify @ sourceforge.jp (svnnotify @ sourceforge.jp)
Date: Mon, 25 Apr 2011 00:01:15 +0900
Subject: [Smartupload-svn] [8]
Message-ID: <1303657275.868282.24220.nullmailer@users.sourceforge.jp>
Revision: 8
http://sourceforge.jp/projects/smartupload/svn/view?view=rev&revision=8
Author: hryksbt
Date: 2011-04-25 00:01:15 +0900 (Mon, 25 Apr 2011)
Log Message:
-----------
Modified Paths:
--------------
trunk/SmartUpload/include/database.php
-------------- next part --------------
Modified: trunk/SmartUpload/include/database.php
===================================================================
--- trunk/SmartUpload/include/database.php 2011-04-24 14:37:16 UTC (rev 7)
+++ trunk/SmartUpload/include/database.php 2011-04-24 15:01:15 UTC (rev 8)
@@ -1,16 +1,27 @@
getMessage());
+$dsn = 'mysql:dbname=upload;host=localhost';
+$user = 'root';
+$password = '********';
+
+try{
+ $dbh = new PDO($dsn, $user, $password);
+ print('接続に成功しました。
');
+ $dbh->query('SET NAMES sjis');
+ $sql = 'select * from shouhin';
+ foreach ($dbh->query($sql) as $row) {
+ print($row['filename']);
+ print($row['uploaddate'].'
');
+ }
+}catch (PDOException $e){
+ print('Error:'.$e->getMessage());
+ die();
}
+$dbh = null;
-//PDO切断
+// PDO切断
// $pdo = null;
?>
\ No newline at end of file
From svnnotify @ sourceforge.jp Mon Apr 25 11:08:41 2011
From: svnnotify @ sourceforge.jp (svnnotify @ sourceforge.jp)
Date: Mon, 25 Apr 2011 11:08:41 +0900
Subject: [Smartupload-svn] [9]
Message-ID: <1303697321.708894.8144.nullmailer@users.sourceforge.jp>
Revision: 9
http://sourceforge.jp/projects/smartupload/svn/view?view=rev&revision=9
Author: hryksbt
Date: 2011-04-25 11:08:41 +0900 (Mon, 25 Apr 2011)
Log Message:
-----------
Removed Paths:
-------------
trunk/SmartUpload/data/06c69f2a.jpg
trunk/SmartUpload/data/aaa.jpg
trunk/SmartUpload/data/mopera.txt
-------------- next part --------------
Deleted: trunk/SmartUpload/data/06c69f2a.jpg
===================================================================
(Binary files differ)
Deleted: trunk/SmartUpload/data/aaa.jpg
===================================================================
(Binary files differ)
Deleted: trunk/SmartUpload/data/mopera.txt
===================================================================
--- trunk/SmartUpload/data/mopera.txt 2011-04-24 15:01:15 UTC (rev 8)
+++ trunk/SmartUpload/data/mopera.txt 2011-04-25 02:08:41 UTC (rev 9)
@@ -1,16 +0,0 @@
-ID: kyc6twgy
-PW: ekybutj2
-
-DNS 220.159.212.201
-DNS 220.159.212.201
-
-moperau ????-
-ID: d6uv788c
-APN: mopera.net
-PW: kaz34612
-
-151 1 4
-
-?????
-00:80:87:19:DE:1C
From svnnotify @ sourceforge.jp Mon Apr 25 11:24:53 2011
From: svnnotify @ sourceforge.jp (svnnotify @ sourceforge.jp)
Date: Mon, 25 Apr 2011 11:24:53 +0900
Subject: [Smartupload-svn] [10]
Message-ID: <1303698293.472450.28416.nullmailer@users.sourceforge.jp>
Revision: 10
http://sourceforge.jp/projects/smartupload/svn/view?view=rev&revision=10
Author: hryksbt
Date: 2011-04-25 11:24:53 +0900 (Mon, 25 Apr 2011)
Log Message:
-----------
Modified Paths:
--------------
trunk/SmartUpload/include/database.php
trunk/SmartUpload/test.php
-------------- next part --------------
Modified: trunk/SmartUpload/include/database.php
===================================================================
--- trunk/SmartUpload/include/database.php 2011-04-25 02:08:41 UTC (rev 9)
+++ trunk/SmartUpload/include/database.php 2011-04-25 02:24:53 UTC (rev 10)
@@ -4,12 +4,12 @@
$dsn = 'mysql:dbname=upload;host=localhost';
$user = 'root';
-$password = '********';
+$password = 'Zaq12wsx';
try{
$dbh = new PDO($dsn, $user, $password);
print('接続に成功しました。
');
- $dbh->query('SET NAMES sjis');
+ //$dbh->query('SET NAMES utf8');
$sql = 'select * from shouhin';
foreach ($dbh->query($sql) as $row) {
print($row['filename']);
Modified: trunk/SmartUpload/test.php
===================================================================
--- trunk/SmartUpload/test.php 2011-04-25 02:08:41 UTC (rev 9)
+++ trunk/SmartUpload/test.php 2011-04-25 02:24:53 UTC (rev 10)
@@ -9,7 +9,7 @@
try {
$pdo = new PDO(
- "mysql:host=localhost; dbname=upload", "root", "san59shi");
+ "mysql:host=localhost; dbname=upload", "root", "********");
$stmt = $pdo->query("SELECT * FROM data_info");
while($row = $stmt->fetch(PDO::FETCH_ASSOC)){
From svnnotify @ sourceforge.jp Mon Apr 25 15:24:41 2011
From: svnnotify @ sourceforge.jp (svnnotify @ sourceforge.jp)
Date: Mon, 25 Apr 2011 15:24:41 +0900
Subject: [Smartupload-svn] [11]
Message-ID: <1303712681.362314.5809.nullmailer@users.sourceforge.jp>
Revision: 11
http://sourceforge.jp/projects/smartupload/svn/view?view=rev&revision=11
Author: hryksbt
Date: 2011-04-25 15:24:40 +0900 (Mon, 25 Apr 2011)
Log Message:
-----------
Modified Paths:
--------------
trunk/SmartUpload/include/database.php
trunk/SmartUpload/upload_file.php
-------------- next part --------------
Modified: trunk/SmartUpload/include/database.php
===================================================================
--- trunk/SmartUpload/include/database.php 2011-04-25 02:24:53 UTC (rev 10)
+++ trunk/SmartUpload/include/database.php 2011-04-25 06:24:40 UTC (rev 11)
@@ -1,27 +1,40 @@
+
+
+
+SmartUpload
+
+
+');
- //$dbh->query('SET NAMES utf8');
- $sql = 'select * from shouhin';
- foreach ($dbh->query($sql) as $row) {
+ $db->query('SET NAMES utf8');
+/* $sql = 'select * from data_info';
+ foreach ($db->query($sql) as $row[]) {
print($row['filename']);
print($row['uploaddate'].'
');
- }
+ }*/
}catch (PDOException $e){
print('Error:'.$e->getMessage());
die();
}
-$dbh = null;
+//$db = null;
-// PDO切断
-// $pdo = null;
-
-?>
\ No newline at end of file
+?>
+
+
\ No newline at end of file
Modified: trunk/SmartUpload/upload_file.php
===================================================================
--- trunk/SmartUpload/upload_file.php 2011-04-25 02:24:53 UTC (rev 10)
+++ trunk/SmartUpload/upload_file.php 2011-04-25 06:24:40 UTC (rev 11)
@@ -2,7 +2,7 @@
/*
* SmartUpload/upload.php
* @author Hiroyuki Shibata
- * 2011/04/17
+ * 2011/04/25
* Rev 1.0
*
*/
@@ -21,45 +21,33 @@
$updir = "./data/";
$filename = $_FILES['upfile']['name'];
$filesize = filesize($_FILES['upfile']['tmp_name']);
+
if(move_uploaded_file($_FILES['upfile']['tmp_name'], $updir.$filename)==FALSE){
print("Upload failed");
print($_FILES['upfile']['error']);
- }
- else {
+ } else {
print(" $filename is uploaded.
");
print("size = "."$filesize"." bytes
");
-// ↓↓↓↓↓↓↓ データベース管理 ↓↓↓↓↓↓↓
+ $db = new PDO($dsn, $user, $password);
+ $db->query("show tables".'
');
- //↓↓↓test↓↓↓
- /* $conn = mysql_connect( "localhost", "root", "******" );
- mysql_set_charset("utf8");
- mysql_select_db( "upload" );
- */
-/*
- $abc = "select * from data_info";
- $res = "mysql_query( $abc ))";
+ // データベース
+ $stmt = $db->prepare(
+ "INSERT INTO data_info (filename, uploaddate, data_size)
+ VALUES(? ,now() ,?)");
+ $stmt->bindParam(1,$filename);
+ $stmt->bindParam(2,$filesize);
+ $stmt->execute();
- while( $row = mysql_fetch_array($res)){
- print( $row["filename" ]."
" );
- print( $row["uploaddate"]."
" );
- print( $row["data_size" ] );
+ print('
');
+ $sql ='select * from data_info';
+ foreach ($db->query($sql) as $row) {
+ print($row['filename']."");
+ print($row['uploaddate'].'');
+ print($row['data_size'].'
');
}
-*/
- //↑↑↑test↑↑↑
-
- // データベースに記録
- /*
- $sql = "INSERT INTO data_info ( filename, uploaddate, data_size ) VALUES ( 'a', now(),1 ) ";
-
- //sqlの確認テスト
- echo $sql."
";
-
- $stmt=$db->prepare("$sql");
- $stmt->execute( array( $filename, $filesize ) );
-*/
}
-
?>
\ No newline at end of file
From svnnotify @ sourceforge.jp Mon Apr 25 15:25:43 2011
From: svnnotify @ sourceforge.jp (svnnotify @ sourceforge.jp)
Date: Mon, 25 Apr 2011 15:25:43 +0900
Subject: [Smartupload-svn] [12]
Message-ID: <1303712743.232126.6034.nullmailer@users.sourceforge.jp>
Revision: 12
http://sourceforge.jp/projects/smartupload/svn/view?view=rev&revision=12
Author: hryksbt
Date: 2011-04-25 15:25:43 +0900 (Mon, 25 Apr 2011)
Log Message:
-----------
Modified Paths:
--------------
trunk/SmartUpload/upload_file.php
-------------- next part --------------
Modified: trunk/SmartUpload/upload_file.php
===================================================================
--- trunk/SmartUpload/upload_file.php 2011-04-25 06:24:40 UTC (rev 11)
+++ trunk/SmartUpload/upload_file.php 2011-04-25 06:25:43 UTC (rev 12)
@@ -32,7 +32,7 @@
$db = new PDO($dsn, $user, $password);
$db->query("show tables".'
');
- // データベース
+ // データベース処理
$stmt = $db->prepare(
"INSERT INTO data_info (filename, uploaddate, data_size)
VALUES(? ,now() ,?)");
From svnnotify @ sourceforge.jp Tue Apr 26 00:53:50 2011
From: svnnotify @ sourceforge.jp (svnnotify @ sourceforge.jp)
Date: Tue, 26 Apr 2011 00:53:50 +0900
Subject: [Smartupload-svn] [13]
Message-ID: <1303746830.850678.25366.nullmailer@users.sourceforge.jp>
Revision: 13
http://sourceforge.jp/projects/smartupload/svn/view?view=rev&revision=13
Author: hryksbt
Date: 2011-04-26 00:53:50 +0900 (Tue, 26 Apr 2011)
Log Message:
-----------
Modified Paths:
--------------
trunk/SmartUpload/include/database.php
trunk/SmartUpload/upload_file.php
Removed Paths:
-------------
trunk/SmartUpload/09_02_fileup.php
trunk/SmartUpload/main.php
trunk/SmartUpload/test.php
-------------- next part --------------
Deleted: trunk/SmartUpload/09_02_fileup.php
===================================================================
--- trunk/SmartUpload/09_02_fileup.php 2011-04-25 06:25:43 UTC (rev 12)
+++ trunk/SmartUpload/09_02_fileup.php 2011-04-25 15:53:50 UTC (rev 13)
@@ -1,39 +0,0 @@
-
-
-
-
-
-ファイルアップローダー
-
-
-
";
- echo "
";
-
- //} else {
- //echo "jpg かgif のファイルしかアップできません。或いはハイフン以外の記号があります。";
- //}
- } else {
- echo "$filesize Byte ファイルサイズが大きすぎます。
100000 Byte 以下にしてください。";
- }
-} else {
-echo "参照で画像ファイルを指定して、表示をクリック!";
-}
-?>
-
-
-
\ No newline at end of file
Modified: trunk/SmartUpload/include/database.php
===================================================================
--- trunk/SmartUpload/include/database.php 2011-04-25 06:25:43 UTC (rev 12)
+++ trunk/SmartUpload/include/database.php 2011-04-25 15:53:50 UTC (rev 13)
@@ -2,7 +2,7 @@
/*
* SmartUpload/upload.php
* @author Hiroyuki Shibata
- * 2011/04/25
+ * 2011/04/26
* Rev 1.0
*
*/
@@ -18,22 +18,16 @@
$dsn = 'mysql:dbname=upload;host=localhost';
$user = 'root';
-$password = '********';
+$password = '******';
try{
$db = new PDO($dsn, $user, $password);
print('接続に成功しました。
');
$db->query('SET NAMES utf8');
-/* $sql = 'select * from data_info';
- foreach ($db->query($sql) as $row[]) {
- print($row['filename']);
- print($row['uploaddate'].'
');
- }*/
-}catch (PDOException $e){
+} catch (PDOException $e) {
print('Error:'.$e->getMessage());
die();
}
-//$db = null;
?>