我的图片上传文件夹的地址应该是什么?
问题描述:
This is where my upload.php is located
xampp/htdocs/site/admin/upload.php
I want to upload images to this address
xampp/htdocs/site/img
I am using this code by W3schools in upload.php
I need to change this code in upload.php file, but confused, what is my img
folder address
$target_dir = "img/";
What to write in this ^^^^^^
这是我的upload.php所在的位置 p>
xampp /htdocs/site/admin/upload.php
nn我想将图像上传到这个地址 p>
xampp / htdocs / site / img
code> pre>
我使用的代码是在upload.php中的W3schools p>
我需要在upload.php文件中更改此代码,但很困惑,我的 img 文件夹地址 p>
$ target_dir =“img /”;
code> pre>
在此写些什么^ ^^^^^ p>
div>
答
Use ../img/
.
..
means the parent directory, so going from xampp/htdocs/site/admin/
to xampp/htdocs/site/
. From here, you just need the img/
directory.