[英]Call php file in cpanel
我正在尝试调用返回“Hello world”的示例 php 文件“example.php”来测试我的应用程序中的某些功能。
当我调用 URL: "http://www.example.com:2083/home/public_html/example.php"
服务器重定向到 cpanel 访问页面。 So, after some google resources, i've generated an API TOKEN through cpanel API token manager and i've tried to call this file using curl like this: "curl -H "Authorization: cpanel username:API_TOKEN" "https://www.example.it:2083/execute/home/public_html/example.php"
但总是检索此消息: {"metadata":{},"data":null,"errors":["Illegal function name:public_html/example.php"],"warnings":null,"messages":null,"status":0}"
。
这是调用 cpanel 上托管的 php 文件的正确方法吗? 谢谢你的帮助:)
看起来您以错误的方式调用文件。
Taking this URL are reference: http://www.example.com:2083/home/public_html/example.php
调用它的正确方法是: http://www.example.com/example.php
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.