...

View Full Version : Uploading files - undefined index



bcarl314
01-12-2004, 05:23 PM
Well, trying to upload files here using code that works on other servers. I'm running on IIS / Apache (Win2000).

I've trouble shooted this and can't seem to find the problem.

I'm even getting an error using the PHP docs code.

Example...

File testUpload.php


<html>
<body>
<form enctype="multipart/form-data" action="upload.php" method="post">
<input type="hidden" name="MAX_FILE_SIZE" value="30000">
Send this file: <input name="userfile" type="file">
<input type="submit" value="Send File">
</form>
</body>
</html>


File upload.php


<html>
<body>
<?php
print $_FILES['userfile']['name']."<br />";
print $_FILES['userfile']['type']."<br />";
print $_FILES['userfile']['size']."<br />";
print $_FILES['userfile']['temp_name']."<br />";
?>
</body>
</html>


Here's the error messages I'm getting...


Notice: Undefined index: userfile in D:\WebPub\HOME\tmp\upload.php on line 4


Notice: Undefined index: userfile in D:\WebPub\HOME\tmp\upload.php on line 5


Notice: Undefined index: userfile in D:\WebPub\HOME\tmp\upload.php on line 6


Notice: Undefined index: userfile in D:\WebPub\HOME\tmp\upload.php on line 7


Any ideas??? An I missing a setting in php.ini???

bcarl314
01-12-2004, 06:00 PM
Never mind, seems to have been a glitch on the Windows server. All works now.

Gotta love those windows "features" :D

isamar
10-27-2008, 03:41 AM
I have the same problem. Can you help me, please?
I am working in a Vista PC



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum