[英]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.