upload go
<?php function do_upload($filename,$newname) { $tmp_upload_path = "c:apachehtdocs\tmp\"; $new_file_name = "c:apacheupload\".$newname; return; } ?> <HTML> <HEAD> <TITLE>PHP - file upload</TITLE> <style type="text/css"> <!-- body { font-family: Arial, Helvetica, sans-serif; font-size: 10pt} --> </style> </HEAD> <BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080"> <?php do_upload($userfile,$newname); ?> <TABLE> <TR> <TD><b>upload report</b></TD><TD></TD> </TR> <TR> </TR> <TR> </TR> <TR> </TR> <TR> <TD>target directory:</TD><TD>c:apachehtdocs\tmp</TD> </TR> <TR> </TR> <TR> </TR> </TABLE> </BODY> </HTML>
i index.php
<?php <HTML> <HEAD> <style type="text/css"> <!-- body { font-family: Arial, Helvetica, sans-serif; font-size: 10pt} --> </style> </HEAD> <BODY> <center> <table> <FORM ENCTYPE="multipart/form-data" ACTION="upload_go.php" METHOD=POST> <INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="100000"> <tr> <td><b>file upload</b></td> <td></td> </tr> <tr> <td>file: </td> <td><input type="File" name="userfile" size="30" maxlength="255"> </td> </tr> <tr> <td>target filename: </td> <td><input type="Text" name="newname" size="30" maxlength="^255"> </td> </tr> <tr> <tr> <td>upload diretory: </td> <td>c:apacheupload</td> </tr> <td colspan="2" align="CENTER"> <INPUT TYPE="submit" VALUE="upload"> </td> </tr> </FORM> </table> </center> </BODY> </HTML> ?>
niestety wywala mi błąd
Warning: copy() [function.copy]: Unable to access c:\apache\htdocs\tmp\ in /var/www/sites/yoyo.pl/a/s/asdddp/upload_go.php on line 6Warning: copy(c:\apache\htdocs\tmp\) [function.copy]: failed to open stream: No such file or directory in /var/www/sites/yoyo.pl/a/s/asdddp/upload_go.php on line 6failed to copy fileupload report upload tmp file: file name: target file name: target directory: c:\apache\htdocs\tmp\file size: file type: " title="Zobacz w manualu PHP" target="_manual
Powie ktoś jak naprawić błąd i co zrobić aby skrypt działał poprawnie
strona http://www.asdddp.yoyo.pl/
Czekam