GitHub Pages是否允许HTTP“发布"?方法? [英] Does `GitHub Pages` allow HTTP "Post" method?

查看:495
本文介绍了GitHub Pages是否允许HTTP“发布"?方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我编写了一些php脚本,该脚本仅将文件从用户上传到服务器.
我已经在本地的XAMMP服务器上进行了测试,一切正常.

I've programmed a little php Script, which just uploads a file from a user to the server.
I've tested in on my XAMMP Server locally, and everything worked fine.

但是当我将其上传到我的GitHub Pages 此处时,出现了此错误405 NOT ALLOWED
因此,我在Google上进行了大量搜索,发现我必须允许使用HTTP Post方法.

But when i uploaded it to my GitHub Pages Here, It got this error 405 NOT ALLOWED
So i googled a lot and found out that i have to allow the HTTP Post Method.

我的问题现在是
我如何在我的github页面上允许POST方法?

My Question is now:
How do i allow POST method on my github page?

谢谢.

推荐答案

GitHub页面只能提供静态内容,并且无法在GitHub页面上运行PHP或上传内容.这就是为什么GitHub不允许POST请求的原因.

GitHub pages can only serve static content, and there is no way to run PHP on GitHub pages or upload things. That's why GitHub doesn't allow POST requests.

如果您需要服务器端脚本(例如PHP),则需要使用提供这些功能的网络托管服务.

If you need server side scripting (E.g. PHP), you'll need to use a web host which offers these things.

这篇关于GitHub Pages是否允许HTTP“发布"?方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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