I've written a PHP page which works fine with PHP4 on Win95. I've now uploaded to my linux based system, which also runs PHP4.
The problem is that I've got two upload boxes in a form:
<form method=post action=$PHP_SELF?action=saveitem>
<input type=file name=pic[] value="">
<input type=file name=pic[] value="">
etc
then, it is dealt with with this code:
$bop=$pic[0];
$sop=$pic[1];
$bp=basename($pic[0]);
$sp=basename($pic[1]);
$path=dirname("$DOCUMENT_ROOT$PHP_SELF");
$bigsubpath="/pics/big/";
$smallsubpath="/pics/small/";
//echo "$bop, $path$bigsubpath$bp";
copy($bop, "$path$bigsubpath$bp");
copy($sop, "$path$smallsubpath$sp");
But I get the following error:
Warning: Unable to open 'C:\WINDOWS\DESKTOP\finished kennedy\pics\landscapes\4.gif' for reading:
Any suggestions - I assume I've done something stupid, but it worked under Win95.
Robert Shilston