dongnao6858 2018-02-27 19:09
浏览 135

如何在PHP中创建回调URL?

So I've been searching the net diligently and I can't seem to find a good(and basic) example of a callback. I get the idea of a callback but I can't make it work. Here's my sample code:

$fp = fopen("file.txt","wb"); 
fwrite($fp,"sample content");
fclose($fp);

Basically what it does is create a new txt file once it is triggered. This is just an example. Once I can get this functional, I can proceed to a more complicated one. But this doesn't work at all.

This is how I call the callback:

http://api.sample.com/post/12123232?callback=http://myurl.com/post/save

Is there anything that I missed here? It's also worth noting that the link above is submitted thru curl.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 Python时间序列如何拟合疏系数模型
    • ¥15 求学软件的前人们指明方向🥺
    • ¥50 如何增强飞上天的树莓派的热点信号强度,以使得笔记本可以在地面实现远程桌面连接
    • ¥15 MCNP里如何定义多个源?
    • ¥20 双层网络上信息-疾病传播
    • ¥50 paddlepaddle pinn
    • ¥20 idea运行测试代码报错问题
    • ¥15 网络监控:网络故障告警通知
    • ¥15 django项目运行报编码错误
    • ¥15 STM32驱动继电器
    • ¥50 invest生境质量模块