# Upload file (PHP)

**URL:** https://forum.kirupa.com/t/upload-file-php/31807
**Category:** Uncategorized
**Created:** [September 27, 2003, 3:18pm UTC](https://forum.kirupa.com/t/upload-file-php/31807 "2003-09-27T15:18:08Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Drunken](https://avatars.discourse-cdn.com/v4/letter/d/a4c791/32.png) [@Drunken](https://forum.kirupa.com/u/Drunken)
#### Post date: [September 27, 2003, 3:18pm UTC](https://forum.kirupa.com/t/upload-file-php/31807/1 "2003-09-27T15:18:08Z")

</div>

heya!

I am trying to do a script to upload a file, like this:

```php
$dest_dir = "/home/webcindario/nunosantos/admin/";
copy ($fich,$dest_dir);

```

$dest\_dir is the destinantion folder  
$fich is the path of the file that is trying to upload

causes an error:

```php
Warning: copy(C:\\Documents and Settings\\Administrador\\Ambiente de trabalho\\logo.gif): 
failed to open stream: No such file or directory 
in /home/webcindario/nunosantos/admin/up_meu.php on line 3

```

but i don’t no why… i have add chmod 777 to that folder … but doesn’t work ☹

thks 🙂
