i am trying to use copy() and am having some problems.
maybe someone can clarify some things.
1) does copy have to be used with the file input? (does the file have to be submitted through a form?)
ex. <input name="attachment" type="file">
2) if so does it have to be submitted from the same page?
below is what i have started
right now i have a variable - $file that is created from an explode call. $file is
/// array of files
$files_list = explode("FILE_START%20",$content);
while ($files_list[$i]){
list ($file_path) = explode("%20FILE_END", $files_list[$i]);
$file = basename ($file_path);
list ($name,$type) = explode(".", $file);
$file_ide = $ide.".".$type;
echo $file_path."<BR>";
echo $file_ide."<BR>";
echo "cgfx/".$file_ide."<BR>";
copy($file_path, "cgfx/".$file_ide) or die("<br>Couldn't upload ".$file);
i am getting this output:
C:/Documents%20and%20Settings/Holmes/Desktop/index.htm
2002-01-29-180242.htm
cgfx/2002-01-29-180242.htm
Warning: Unable to open 'C:/Documents%20and%20Settings/Holmes/Desktop/test.htm' for reading: No such file or directory in submit.php on line 30
Couldn't upload index.htm
i am thinking that the problem is because i am not using <input file>, but am not sure. please help