URGENT, PLEASE HELP !!
Posted: Wed Sep 24, 2003 1:15 pm
I am trying to upload a file in php, but it gives me this error :
Warning: move_uploaded_file(/home/httpd/htdocs/gbcb/): failed to open stream: Is a directory in /home/httpd/htdocs/gbcb/upload_app_files.php on line 26
Warning: move_uploaded_file(): Unable to move '/tmp/phpCaJbP9' to '/home/httpd/htdocs/gbcb/' in /home/httpd/htdocs/gbcb/upload_app_files.php on line 26
below is my code for this :
the location where my file is /home/httpd/htdocs/gbcb/upload.php
I am working on windows
the server is on another machine
PLEASE HELP !!
/**********************************************************/
<?php
$transcript = $_FILES['userfile']['name'][0];
$tmp_dest = $_FILES['userfile']['tmp_name'][0];
?>
<p><?php echo "transcript value : $transcript";?> </p>
<p><?php echo "temporary destination value : $tmp_dest"; ?> </p>
<?php
$up = move_uploaded_file($_FILES['userfile']['tmp_name'][0], '/home/httpd/htdocs/gbcb/');
var_dump($up);
if($up)
{
echo "File uploaded";
}
else
{
echo "Not uploaded";
}
?>
/**********************************************************/
Warning: move_uploaded_file(/home/httpd/htdocs/gbcb/): failed to open stream: Is a directory in /home/httpd/htdocs/gbcb/upload_app_files.php on line 26
Warning: move_uploaded_file(): Unable to move '/tmp/phpCaJbP9' to '/home/httpd/htdocs/gbcb/' in /home/httpd/htdocs/gbcb/upload_app_files.php on line 26
below is my code for this :
the location where my file is /home/httpd/htdocs/gbcb/upload.php
I am working on windows
the server is on another machine
PLEASE HELP !!
/**********************************************************/
<?php
$transcript = $_FILES['userfile']['name'][0];
$tmp_dest = $_FILES['userfile']['tmp_name'][0];
?>
<p><?php echo "transcript value : $transcript";?> </p>
<p><?php echo "temporary destination value : $tmp_dest"; ?> </p>
<?php
$up = move_uploaded_file($_FILES['userfile']['tmp_name'][0], '/home/httpd/htdocs/gbcb/');
var_dump($up);
if($up)
{
echo "File uploaded";
}
else
{
echo "Not uploaded";
}
?>
/**********************************************************/