Jump to content

[SOLVED] How do I get this?


LooieENG

Recommended Posts

How do I get the info $_FILES['file']['type'] contains? :/

 

I tried print_r($_FILES) and it just said Array()

 

Edit: html

 

	<p><form action="upload.php" method="post" name="uploader">
	<input name="file" type="file" size="50" /><input type="submit" name="upload" value="Upload" />
</form></p>

Link to comment
https://forums.phpfreaks.com/topic/115762-solved-how-do-i-get-this/
Share on other sites

from above

print $_FILES['file']['type'];

 

make sure that 'file' corresponds to the name given to your input not the type, i made the name uploadfile

so your form should say <input type="file" name="uploadfile">

 

hen my files array code looks like

 

$_FILES['uploadfile']['type'] so print that and you are golden, if you still get a blank screen then something is wrong with php

Please show us the form you are using. It's most likely that there is a problem with the form.

 

Ken

 

	<p><form action="upload.php" method="post" name="uploader">
	<input name="file" type="file" size="50" /><input type="submit" name="upload" value="Upload" />
</form></p>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.