mia_tech
08-02-2008, 01:14 AM
I have a very simple php file that uploads a file to the server, but I'm getting errors, the upload dir on the server has the right permissions.......this is windows server running IIS 6.. here's the code
<html>
<body>
<h3>File upload results.</h3>
<?php
//where files are goint to be uploaded
$file_dir = "C:\Inetpub\wwwroot\upload";
foreach($_FILES as $file_name => $file_array) {
print "Path: ".$file_array['tmp_name']."<br>\n";
print "Name: ".$file_array['name']."<br>\n";
print "Type: ".$file_array['type']."<br>\n";
print "Size: ".$file_array['size']."<br>\n";
if (is_uploaded_file($file_array['tmp_name'])){
move_uploaded_file($file_array['tmp_name'],
"$file_fir/$file_array[name]") or die ("couldn't copy");
print "file was moved!<br><br>";
}
}
?>
</body>
</html>
if some one could give me a hand as to why the file it's not been uploaded
thanks
www.pctechtips.org
<html>
<body>
<h3>File upload results.</h3>
<?php
//where files are goint to be uploaded
$file_dir = "C:\Inetpub\wwwroot\upload";
foreach($_FILES as $file_name => $file_array) {
print "Path: ".$file_array['tmp_name']."<br>\n";
print "Name: ".$file_array['name']."<br>\n";
print "Type: ".$file_array['type']."<br>\n";
print "Size: ".$file_array['size']."<br>\n";
if (is_uploaded_file($file_array['tmp_name'])){
move_uploaded_file($file_array['tmp_name'],
"$file_fir/$file_array[name]") or die ("couldn't copy");
print "file was moved!<br><br>";
}
}
?>
</body>
</html>
if some one could give me a hand as to why the file it's not been uploaded
thanks
www.pctechtips.org