trouble with file upload page using PHP

From: Date: Wed, 06 Jul 2005 23:10:30 +0000
Subject: trouble with file upload page using PHP
Groups: php.general 
Request: Send a blank email to php-general+get-218257@lists.php.net to get a copy of this message
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

« previous php.general (#218257) next »