#1
|
||
|
File uploading question, please answer!
Hey this keeps on getting an error... :
Qoute: Parse error: parse error, unexpected '.' in /home/waradmn/public_html/fileuploader.php on line 22 [code:1:ca70bda09f] <? /***Upload File Script***/ /*Uploading File*/ /* In This script we will be allowing a user to upload their file, and of course, host it , their signature, or image! */ if(isset($userfile)) { if("multipart/x-zip"==$_FILES['userfile']['type']) { $zip="home/site/www/"; $uploadfile = $zip . $_FILES['userfile']['name']; if(move_uploaded_file($_FILES['userfile']['tmp_nam e'],$uploadfile)) { $file=$_FILES['userfile']['name']; $name=$_FILES['userfile']['name']; $debug=$_FILES; @chmod("/home/site/www/".$name, 0777"); echo"$name is now uploaded and hosted. To have a download link to it click <a href=\"www.wargamershq.com/home/www/files\">here</a>"; }else{ echo"A problem with uploading your file occured! <b>DEBUG:</b>"; print_r($_FILES); } }else{ echo"Wrong file type! It must be in .zip extention!"; } } ?> [/code:1:ca70bda09f] |
#2
|
||
|
I got the error "Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in c:\server\www\test.php on line 22"
Anyways, it's to do with your chmod command. You have a " after 0777, there should be no ". [code:1:00b3e55bd2] @chmod("/home/site/www/".$name, 0777); [/code:1:00b3e55bd2] And I would actually recoment for use on a wider range of systems, [code:1:00b3e55bd2] @chmod("/home/site/www/".$name, octdec("0777")); [/code:1:00b3e55bd2]
__________________
04' Dodge SRT-4, Mopar Stage 3, 406whp/436wtq |
#3
|
||
|
try adding your url in the config.php
www.yoursite.com/folder/Uploader/ |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
a simple question with no answer | KU43 | Humor & Jokes | 1 | 12-22-2007 11:43 PM |
Another Question, Plz Answer | °»ÐÑ«° | Delta Force | 3 | 04-19-2006 05:57 PM |
Question, Plz Answer | °»ÐÑ«° | Delta Force | 2 | 04-19-2006 04:05 PM |
Do you know the answer to this question? | SilentTrigger | General Chat | 11 | 03-04-2006 08:45 AM |
Question plzz answer | nocky | Sigs and Graphics | 1 | 11-12-2003 05:26 PM |