[英]Is there a way to send php post requests without a web server?
I was trying to send POST requests via Javascript but decided PHP would be more suitable. 我试图通过Javascript发送POST请求,但认为PHP更合适。 I was wondering if there is a way to send a request with PHP without using a web server. 我想知道是否有一种无需使用Web服务器即可使用PHP发送请求的方法。 Thanks. 谢谢。
you can run php from command line 您可以从命令行运行php
http://php.net/manual/en/features.commandline.php http://php.net/manual/zh/features.commandline.php
you can create a php script and easily run it like a batch using: 您可以创建一个php脚本,并使用以下命令像批处理一样轻松运行它:
c:\\php\\cli\\php.exe script.php %1 %2 %3 %4 c:\\ php \\ cli \\ php.exe script.php%1%2%3%4
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.