PHP:Uploading to wrong folder. How to change it to get it in to right place?

I want to Upload picture to my web server. \[code\]$newname = dirname(__FILE__).'/upload/'.$filename;\[/code\]The code above would add my picture to folder like this:\[code\]www.something.com/admin/upload\[/code\]How could I get my file to the correct folder:\[code\]www.something.com/upload\[/code\]As you see, it should go one forder back. The complety code is found on:http://www.webcheatsheet.com/PHP/file_upload.php
 
Back
Top