0

hi i am working in php. and my assigned task is to upload a file and save it into the directory. i have install wamp into D-drive but it not working and dont get the path. i was trying the following:

<?php
  echo "Upload: " . $_FILES["file"]["name"] . "<br>";
  echo "Type: " . $_FILES["file"]["type"] . "<br>";
  echo "Size: " . ($_FILES["file"]["size"] / 1024) . " kB<br>";
  echo "Stored in: " . $_FILES["file"]["tmp_name"];
?>

its don't get the path of tem_name while if i install the wamp into C: it gets the folder and store the file into it. what the problem with this code? why it couldn't get the folder name??

4
Contributors
5
Replies
6
Views
4 Years
Discussion Span
Last Post by hakeemtunde
0

You mean that everything else is working (e.g. var_dump($_FILES["file"]["name"]) is correct) but the temporary file in the file system ( e.g. var_dump($_FILES["file"][" tmp_name"]) ) isn’t ?

If this is the case what outputs the last statement;

0

string '' (length=0) is the output when i use var_dump($_FILES["file"]["tmp_name"]) for the folder

0

place

phpinfo();

into this file and search for upload_tmp_dir

have a look to see where it's pointing

Edited by diafol

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.