0

Hi Guys!

I'm having problem with uploading the file to the server. This is my code.

$path = "Files/01 Admin Procedure/" . basename($_FILES["txtFilename"]["name"]);

$x = move_uploaded_file($_FILES['txtFilename']['tmp_name'], $path);

//Move file to directory
if ($x) 
{   
    echo "<script>alert('File " . basename( $_FILES["txtFilename"]["name"]) . " has been uploaded!')</script>";
}
else
{
    echo "<script>alert('Error Uploading File! $path')</script>";
}
3
Contributors
8
Replies
22
Views
3 Years
Discussion Span
Last Post by xuexue
0

The code is working on my localhost but if I run in on the server, it does not upload the file, do I need to configure anything on php.ini? or in IIS?

0

How do I check if the path has access? This is on the server side.

0

Right click the folder, select properties and change the security permissions for iweb_user to desired CHMOD settings.

0

Got it already! You just need to change the permission settings of C:\Windows\Temp :)

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.