File Uploading

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
inni
Forum Newbie
Posts: 1
Joined: Mon Sep 29, 2003 1:13 am
Location: Islamabad
Contact:

File Uploading

Post by inni »

hello friends....
I am having some problem in giving the path in php while uploading the file.
here is the code for that :
<?
move_uploaded_file(['file']['name'], "c://");
?>
and the code gives me the following error...
Parse error: parse error, expecting `')'' in c:\apache\htdocs\temp\upload.php
can any one help to solve the issue...
regards !
Abdul Mannan
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

['file']['name']
this would select the element name of an array that is the element file of an array ...if there was such an array.
You probably want

Code: Select all

move_uploaded_file($_FILES['file']['name'], "c:/");
see also: http://www.php.net/manual/en/features.file-upload.php
User avatar
itsmani1
Forum Regular
Posts: 791
Joined: Mon Sep 29, 2003 2:26 am
Location: Islamabad Pakistan
Contact:

Post by itsmani1 »

Well the problem is with the path
how the give the path
donot know the syntex to giv the path
Post Reply