Re: Upload files problem with IIS server
| From: | chris smith | Date: | Sat, 05 Aug 2006 05:07:31 +0000 |
| Subject: | Re: Upload files problem with IIS server | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-240179@lists.php.net to get a copy of this message | ||
On 8/5/06, Mace Eliason <meliason@shaw.ca> wrote:
Hi, I am having problems with uploading files to a windows server using php. I have used the same script on other server with no problems. From what I can tell this new server is running windows with IIS. I think the problem is with the path. Does anyone have any suggestions? Here is a snipet of some of the code. $uploadDir = "/gamestats/"; $uploadFile = $uploadDir . $_FILES['bannerfile']['name']; echo $bannerfile . "<br>"; /* added for testing */ echo $uploadDir . "<br>"; /* added for testing */ echo $uploadFile . "<br>"; /* added for testing */ if (move_uploaded_file($_FILES['bannerfile']['tmp_name'], $uploadFile)) {and the errors you get are... ? check the folder is writable: echo "is_writable: " . is_writable($uploadDir) . "<br/>"; Is that the whole code? I doubt this would work on linux platforms either because your script will not be able to create /gamestats (ie in the / folder, not in your /home/httpd/domain.com folder or where-ever it is). IIS needs the destination folder marked with 'modify' permissions in IIS so you can create and delete files, maybe that's the problem. -- Postgresql & php tutorials http://www.designmagick.com/..........