dongza1708 2017-01-13 08:56
浏览 66

通过命令行使用header命令运行PHP脚本

I try to run a PHP script on my raspberry pi via command line, this part works fine. I use this command : php myscript.php

But I use a header command in this script, to access another script on another server like this : header("Location: http://www.anotherserver.com/myscript"). This script works also fine when I run it from my web browser, but when I run it from the command line, the header part will be not executed.

Do you have any solution for this problem ? Thanks alot.

  • 写回答

1条回答 默认 最新

  • dousi4900 2017-01-13 08:58
    关注

    You can use exec ( instead of header to execute another script from the current script.

    评论

报告相同问题?

悬赏问题

  • ¥15 keil的map文件中Image component sizes各项意思
  • ¥30 BC260Y用MQTT向阿里云发布主题消息一直错误
  • ¥20 求个正点原子stm32f407开发版的贪吃蛇游戏
  • ¥15 划分vlan后,链路不通了?
  • ¥20 求各位懂行的人,注册表能不能看到usb使用得具体信息,干了什么,传输了什么数据
  • ¥15 Vue3 大型图片数据拖动排序
  • ¥15 Centos / PETGEM
  • ¥15 划分vlan后不通了
  • ¥20 用雷电模拟器安装百达屋apk一直闪退
  • ¥15 算能科技20240506咨询(拒绝大模型回答)