如何在 Azure 托管的 dotnet 核心 Web 应用程序上托管 php 脚本 [英] How can I host a php script on a dotnet core web app hosted at Azure

查看:32
本文介绍了如何在 Azure 托管的 dotnet 核心 Web 应用程序上托管 php 脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我试图让一个 php 脚本在 Azure 中的 dotnet 核心 Web 应用程序上运行.

我在 wwwroot/php/文件夹中添加了一些 php 脚本.

我认为只要访问 domain.com/php/script.php 即可执行此脚本.但是当我这样做时,我只会得到 404.我已经确认该文件在那里,所以我不确定为什么我会收到 404 ..

我还需要做些什么才能让它发挥作用吗?

解决方案

您可以创建一个虚拟目录来实现此目的.从

so I am trying to get a php script to run on a dotnet core web app in Azure.

I added some php scripts to the wwwroot/php/ folder.

I assumed it would be as easy as going to domain.com/php/script.php in order to execute this script. But I only get 404 when I do. I have verified that the file is there so I am not sure why I get 404s..

Is there anything else I need to do in order for this to work?

解决方案

You could create a Virtual directory to achieve this. From the Azure portal, select your app service and click on Application settings, then scroll down to Virtual applications and directories. Just enter your virtual directory and the physical path as below, after that done click Save button.

这篇关于如何在 Azure 托管的 dotnet 核心 Web 应用程序上托管 php 脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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