[PHP-users 7609] Re: $B%U%!%$%k%"%C%W%m!<%I$K(B$B$D$$$F(B

Hidenori Uemura php-users@php.gr.jp
Tue, 21 May 2002 14:33:16 +0900


$B?"B<$G$9!#(B
$B2hLLIt!"(B
<INPUT type="file" name="userfile[]">
<INPUT type="file" name="userfile[]">
<INPUT type="file" name="userfile[]">
$B$H#3$D%"%C%W$G$-$k$h$&$K$7$F$^$9!#(B

$B=hM}It!"(B
$dir1 = $serverDir;$B!J(B/home/pic/$B!K(B
$fname = $dir1 . $userfile_name[$i];
if (file_exists($userfile[$i]) && $fname){
$B!!!!(Bif (copy($userfile[$i],$fname)){
$B!!!!!!!!(Becho "OK";
$B!!!!(B}
$B!!!!(Belse{
$B!!!!!!!!(Becho "NG1 userfile[$i]: " . $userfile[$i] . " file : " . $fname;
$B!!!!(B}
}
else{
$B!!!!!!!!(Becho "NG2 userfile[$i]: " . $userfile[$i] . " file : " . $fname;
}

$B7k2L(B
NG2 userfile[1]: C:\\Documents and Settings\\aaa\\$B%G%9%/%H%C%W(B
\\aaa.txt file : /home/pic/ 

(1)$userfile[1]$B$,%5!<%P$N%Q%9$G$J$/%/%i%$%"%s%H%Q%9!#(B
(2)$userfile_name[1]$B$KCM$,F~$C$F$$$J$$!#(B
$B$3$N$h$&$K$J$j$^$9!#$h$m$7$/$*4j$$$7$^$9!#(B



> $B$3$s$K$A$O2,:j$G$9!#(B
> 
> > PHP$B$N%U%!%$%k%"%C%W%m!<%I$K$D$$$F!"(B
> >(snip)
> > $B;d$O%+%9%?%^%$%:$r$7$F$$$F!"(B
> > $B9=@.$O35MW$O(B
> > main.php
> > 	statusSet.php
> > 
> > 	html.php
> > $B$C$F$J$+$s$8$G$9!#(B
> > html.php$B$G%U%!%$%k%"%C%W%m!<%I$rDI2C$9$k$N$G$9$,!"(B
> > submit$B$9$k$H(Bmain.php$B$r$h$S(BstatusSet.php$B$G>r7o$K$h$jB>$N(B.php$B$r8F$V$?$a(B
> > html.php$B$K%"%C%W%m!<%I=hM}$r5-=R$G$-$^$;$s!#(B
> > $B$G$9$N$G!"(BstatusSet.php$B$K%"%C%W%m!<%I=hM}$r5-=R$9$k$N$G$9$,!"(B
> > $B%Q%i%a!<%?$r<hF@$G$-$J$$>u67$G$9!#(B
> 
> $B$I$&$$$&=hM}$r$7$?$i!"%Q%i%a!<%?$,<u$1<h$l$J$+$C$?$N$+5-=R(B
> $B$7$?J}$,$$$$$H;W$$$^$9!#(B
> $BNc!'(B
> $userfile=$_SESSION['userfile'];
> $B$H$7$?$,<u$1<h$l$J$+$C$?!&!&!&(B
> $BEy(B
> 
> /_/_/_/_/_/_/_/_/_/_/_/_/_/
> Japan Human Base 
> Sotaro Okazaki
> Email : okazaki@jp-hb.com
> /_/_/_/_/_/_/_/_/_/_/_/_/_/
> 
> _______________________________________________
> PHP-users mailing list
> PHP-users@php.gr.jp
> http://ns1.php.gr.jp/mailman/listinfo/php-users