ezek
10.31.05, 12:07 PM
My php knowledge is very very basic as you can see from these scripts. Im trying to allow users to upload files to my server and to appear in a gallery. The gallery section i have sorted. But its the two scripts i have written to upload the images. One is a upload.php and the other is getfile.php.
i get this when i try and upload Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/*******/public_html/getfile.php on line 8
Here is the code for getfile.php
<html>
<head>
<title>Process Uploaded File</title>
</head>
<body>
<?php
if ( move_uploaded_file ($_FILES['uploadFile'] ['tmp_name'],
****** ""http://www.************.com/uploads/{$_FILES['uploadFile'] ['name']}")* )
***** {* print '<p> The file has been successfully uploaded </p>';
****** }
else
***** {
******* switch ($_FILES['uploadFile'] ['error'])
******** {* case 1:
****************** print '<p> The file is bigger than this PHP installation allows</p>';
****************** break;
*********** case 2:
****************** print '<p> The file is bigger than this form allows</p>';
****************** break;
*********** case 3:
****************** print '<p> Only part of the file was uploaded</p>';
****************** break;
*********** case 4:
****************** print '<p> No file was uploaded</p>';
break;
******** }
****** }
?>
</body>
</html>
i get this when i try and upload Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/*******/public_html/getfile.php on line 8
Here is the code for getfile.php
<html>
<head>
<title>Process Uploaded File</title>
</head>
<body>
<?php
if ( move_uploaded_file ($_FILES['uploadFile'] ['tmp_name'],
****** ""http://www.************.com/uploads/{$_FILES['uploadFile'] ['name']}")* )
***** {* print '<p> The file has been successfully uploaded </p>';
****** }
else
***** {
******* switch ($_FILES['uploadFile'] ['error'])
******** {* case 1:
****************** print '<p> The file is bigger than this PHP installation allows</p>';
****************** break;
*********** case 2:
****************** print '<p> The file is bigger than this form allows</p>';
****************** break;
*********** case 3:
****************** print '<p> Only part of the file was uploaded</p>';
****************** break;
*********** case 4:
****************** print '<p> No file was uploaded</p>';
break;
******** }
****** }
?>
</body>
</html>