[英]php web socket script bat file remain open
I need to run a script that initiate a web socket via cmd prompt and the cmd prompt needs to remain open. 我需要运行一个脚本,通过cmd提示符启动Web套接字,cmd提示符需要保持打开状态。 How do I do this? 我该怎么做呢?
Using the example from PHP website for the command line section. 使用PHP网站上的示例获取命令行部分。 I have a .bat
file with the code: 我有一个带有代码的.bat
文件:
"C:\Program Files (x86)\PHP\v5.3\php.exe" -f C:\path_to_script\pear_web_socket_server.proc.php
But everytime I run this bat file. 但每次我运行这个bat文件。 The cmd window is closed instantly after the script has ran once. 脚本运行一次后,cmd窗口立即关闭。
Add a pause to the script. 向脚本添加暂停。 For example: 例如:
@echo off
"C:\Program Files (x86)\PHP\v5.3\php.exe" -f C:\path_to_script\pear_web_socket_server.proc.php
Pause
Save the file with the .bat extension. 使用.bat扩展名保存文件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.