Posted by Bruce Gilbert on 07/07/05 02:10
I am testing a page that uploads a file to my server using PHP.
I get an error stating:
"Warning: copy(/hsphere/local/home/bruceg/inspired-evolution.com/LOR-BRUCE.pdf):
failed to open stream: Permission denied in
/hsphere/local/home/bruceg/inspired-evolution.com/Uploader.php on line
4
Could not copy file"
the page is at http://inspired-evolution.com/Uploader.php
and the PHP code is:
<?php
if( $_FILES['file'] ['name'] !="" )
{copy ( $_FILES ['file'] ['tmp_name'],
"/hsphere/local/home/bruceg/inspired-evolution.com/".$_FILES['file']['name'])
or die ( "Could not copy file" );
}
else{ die ( "No file specified" ) ; }
?>
<ul>
<li> Sent: <?php echo $_FILES ['file'] ['name']; ?></li>
<li>Size: <?php echo $_FILES ['file'] ['size']; ?> bytes </li>
<li>Type: <?php echo $_FILES ['file'] ['type']; ?>
</ul>
<a href="<?php echo $_FILES ['file'] ['name'] ; ?>"
View File</a>
is there a way to accomplish this by adding something to the script above?
thanks,
Bruce
Navigation:
[Reply to this message]
|