I want to Upload picture to my web server.
$newname = dirname(__FILE__).'/upload/'.$filename;
The code above would add my picture to f开发者_Python百科older like this:
www.something.com/admin/upload
How could I get my file to the correct folder:
www.something.com/upload
As you see, it should go one forder back.
The complety code is found on:
http://www.webcheatsheet.com/PHP/file_upload.php
$newname = realpath(dirname(__FILE__).'/../upload').'/'.$filename;
精彩评论