开发者

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

开发者 https://www.devze.com 2023-01-14 19:34 出处:网络
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:

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;
0

精彩评论

暂无评论...
验证码 换一张
取 消