2

I am learning creating Websockets in PHP. I have code for client side and for server side file as well. I want to learnt how to run php files through command line. Can anyone please provide me step by step solution for the same?

3
  • It depends a lot on the server but what have you tried? php /home/user/public_html/script.php arg1 arg2 Commented Mar 15, 2014 at 9:11
  • Welcome to StackOverflow Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it. Please take a tour here Commented Mar 15, 2014 at 9:11
  • I am running windows 8. Commented Mar 16, 2014 at 13:03

1 Answer 1

2

If you're on Windows, make sure you have PHP installed and type this into a command prompt:

C:\Path\To\php.exe C:\Path\To\Your\script.php

(source: http://www.php.net/manual/en/install.windows.commandline.php)

And on Linux/Unix: php /path/to/script.php

Sign up to request clarification or add additional context in comments.

2 Comments

Tried this but not working. It is getting disconnected.
Then there must be something wrong with your code. Would you care sharing your code?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.