Check my script?
Moderator: General Moderators
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
I see no harm in it........ why dont u try changing the directory to your root directory... see if that works
Last edited by John Cartwright on Wed Feb 18, 2004 11:07 pm, edited 1 time in total.
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
-
Illusionist
- Forum Regular
- Posts: 903
- Joined: Mon Jan 12, 2004 9:32 pm
try setting your folder to copt to to something like:
and edit the path:
/home/hsphere/local/home/monkeyj/monkeyblast.com/anims/upload
to whatever it should be.
Code: Select all
$dir = $_SERVER['DOCUMENT_ROOT'] . "/home/hsphere/local/home/monkeyj/monkeyblast.com/anims/upload";/home/hsphere/local/home/monkeyj/monkeyblast.com/anims/upload
to whatever it should be.
am i reading u correctly?
So my PHP code should then look like...?
After setting that.. I get a parse error
Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in /home/hsphere/local/home/monkeyj/monkeyblast.com/submit.php on line 3
?>
Code: Select all
<?php
if (is_uploaded_file($_FILESї'userfile']ї'tmp_name'])) {
copy($_FILESї'userfile']ї'tmp_name'], "$dir = $_SERVERї'DOCUMENT_ROOT'] . "/home/hsphere/local/home/monkeyj/monkeyblast.com/anims/upload"; ");
} else {
echo "Possible file upload attack. Filename: " . $_FILESї'userfile']ї'name'];
}
/* ...or... */
move_uploaded_file($_FILESї'userfile']ї'tmp_name'], "$dir = $_SERVERї'DOCUMENT_ROOT'] . "/home/hsphere/local/home/monkeyj/monkeyblast.com/anims/upload"; ");
?>Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in /home/hsphere/local/home/monkeyj/monkeyblast.com/submit.php on line 3
?>