Note Submitter: Chaos Mixed aka Chaosmixed
----
To people with IIS and php on a windows XP machine:
Php.ini:
upload_tmp_dir = "C:\Inetpub\wwwroot\upload_tmp\"
then create two folder in the wwwroot directory:
C:\Inetpub\wwwroot\upload
C:\Inetpub\wwwroot\upload_tmp
Make sure sharing, web sharing and ntfs security, is ok
------------------------
upload form
<html>
<body>
<form action="uploader.php" method="post" enctype="multipart/form-data">
<label for="file">Filename:<label>
<input type="file" name="file" id="file" >
<br >
<input type="submit" name="submit" value="Submit" >
</form>
</body>
</html>
------------------------
the uploader
<?php
if ($_FILES["file"]["error"] > 0)
{
echo "Error: " . $_FILES["file"]["error"] . "<br />";
}
else
{
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"];
echo "<br>";
}
if (file_exists("/php/upload/" . $_FILES["file"]["name"]))
{
echo $_FILES["file"]["name"] . " already exists. ";
}
else
{
move_uploaded_file($_FILES["file"]["tmp_name"],
"upload/" . $_FILES["file"]["name"]);
echo "Stored in: " . "upload/" . $_FILES["file"]["name"];
}
?>
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.