将文件上传到驱动器d://php上 [英] upload file on drive d:// php

查看:75
本文介绍了将文件上传到驱动器d://php上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将文件从本地计算机上运行的应用程序上载到应用程序根文件夹所在的驱动器之外的另一个驱动器.这里包括文件夹结构:

I want to upload files from apps running on the local computer to another drive outside the drive where my application's root folder. Here I include the folder structure:

  • 根应用程序: C://程序文件/zend/apache/htdocs/myWeb
  • root app: C: // Program files / zend / apache / htdocs / myWeb

这是我要上传的文件目标路径: D://附加的文件/web/file.jpg

This is the file destination path I want to upload: D: // attached file / web / file.jpg

希望你能帮助我.

推荐答案

在move_uploaded_file()方法中指定具有驱动器路径的文件

Specifies the file with drive path in move_uploaded_file() method

move_uploaded_file($_FILES["file"]["tmp_name"],  "D:/somefolder/" . $_FILES["file"]["name"]);

这篇关于将文件上传到驱动器d://php上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆