Page 1 of 1

File Uploading

Posted: Mon Sep 29, 2003 1:13 am
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

Posted: Mon Sep 29, 2003 1:49 am
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

Posted: Mon Sep 29, 2003 2:57 am
by itsmani1
Well the problem is with the path
how the give the path
donot know the syntex to giv the path