我可以写入文件系统上蔚蓝的网站? [英] Can I write to file system on azure web site?

查看:80
本文介绍了我可以写入文件系统上蔚蓝的网站?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以写入文件系统上蔚蓝的网站?例如更新或从仪表盘在Word preSS安装插件/主题。据我所知,这是不可能在Heroku那么,关于Az​​ure网站?

Can I write to file system on azure Web Site? for example updating or installing plugins/themes in Wordpress from dashboard. AFAIK, it is not possible on Heroku so what about Azure Web Sites?

推荐答案

当然有可能的Azure网站的文件系统上写字。但是你的写权限仅限于您的应用程序的根文件夹。所以,如果你使用ASP.NET,你应能在内使用Server.Mappath写的任何地方(〜/ from_here_on)。这意味着你将能够在其位于您的应用程序及以下的根文件夹中的文件进行读取/写入/删除操作。如果你使用PHP,根文件夹可以从 $ _获得SERVER ['DOCUMENT_ROOT'] 环境变量。

Surely it is possible to write on the file system of Azure Websites. However your write permissions are limited to the root folder of your app. So, if you use ASP.NET, you shall be able to write anywhere within the Server.MapPath("~/from_here_on"). Meaning you shall be able to perform read/write/delete operations on files which are located in the root folder of your app and below. If you use PHP, the root folder can be get from $_SERVER['DOCUMENT_ROOT'] environment variable.

和一个Web应用程序不应需要更多的特权。对于肯定不会能够在操作系统文件夹的写。

And a web application shall not need more privileges. For sure will not be able to write on the operating system folders.

这篇关于我可以写入文件系统上蔚蓝的网站?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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