---
title: "$userfile_type problem"
type: "forum-thread"
url: "https://www.webforum.nu/amne/php/15875-userfile-type-problem"
topic: "PHP"
topic_url: "https://www.webforum.nu/amne/php"
author: "hannes"
published: "2001-07-17T10:50:00.000Z"
updated: "2001-07-18T08:30:00.000Z"
replies: 2
views: 180
page: 1
pages: 1
language: "sv-SE"
site: "webForum — webforum.nu"
rights: "Upphovsrätten till varje inlägg tillhör dess författare."
attribution: "Citera som: webForum, https://www.webforum.nu/amne/php/15875-userfile-type-problem"
---

# $userfile_type problem

## #1 — hannes, 2001-07-17T10:50Z

jag har en funktion:
function display_upload_pic_table(){
	echo "\<table width='250'\>";
	echo "	\<form action='".$PHP_SELF."' method='post' enctype='multipart/form-data'\>";
	echo "	\<tr\>\<td align='right'\>Bild:\</td\>				\<td align='left'\>\<input type='file' name='userfile' value=''\>\</td\>\</tr\>";
	echo "	\<tr\>\<td colspan='2' align='center'\>\<input type='Submit' name='upload' value='Skicka'\>\</td\>\</tr\>";
	echo "	\</form\>";
	echo "\</table\>";
}

när jag sen ska jobba med filen har filtypen försvunnit!

jag får filnamnet med $userfile_name, storleken med $userfile_size, men vill jag ha ut filtypen med $userfile_type får jag inte ett skit...
har inte en aning om vad felet är och mitt hår blir gråare & gråare... 
hilfe bitte!

Permalänk: https://www.webforum.nu/p/15875

## #2 — stevenet, 2001-07-17T18:47Z

PHP-version?

\------------------
[SteveNet](http://www.webmarkit.net/stevenet)

Permalänk: https://www.webforum.nu/p/319759

## #3 — hannes, 2001-07-18T08:30Z

PHP Version 4.0.4pl1 på linuxburk

förresten:
$HTTP_POST_FILES\['userfile'\]\['type'\] ger null också....
$HTTP_POST_FILES\['userfile'\]\['name'\] & $HTTP_POST_FILES\['userfile'\]\['size'\] funkar bra...

Configure command:
'./configure' '--prefix=/usr' '--with-config-file-path=/etc' '--disable-debug' '--enable-pic' '--enable-shared' '--enable-inline-optimization' '--with-apxs=/usr/sbin/apxs' '--with-exec-dir=/usr/bin' '--with-regex=system' '--with-gettext' '--with-gd' '--with-jpeg-dir=/usr' '--with-png' '--with-zlib' '--with-db2' '--with-db3' '--with-gdbm' '--enable-debugger' '--enable-magic-quotes' '--enable-safe-mode' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-track-vars' '--enable-yp' '--enable-ftp' '--enable-wddx' '--without-mysql' '--without-oracle' '--without-oci8' '--with-xml'

Permalänk: https://www.webforum.nu/p/319760

---

Tråden på webben: https://www.webforum.nu/amne/php/15875-userfile-type-problem
