wingman Posted April 14, 2007 Share Posted April 14, 2007 I am a New Kid in programming and PHP, and self learning. I read books to set Command Line. I brought up the MS-DOS shell, it reads: C:\Documents and Settings\user> Then, what command should I type to re-direct the path!? By file searching, my php.exe saved in: C:\php and C:\Program Files\php And is that right I should first save the php file in C:\Program Files\Apache Group\Apache2\htdocs .... before execute the file!? Thanks for advice, but sorry I am a kid in programming that needs details direction .... Would be grateful if you can show me step by step. Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted April 14, 2007 Share Posted April 14, 2007 if you have installed Apache then you place your PHP files in the htdocs folder. Then you go to http://localhost to run your PHP files. You don't use the command line. You only use the command if you don't have a httpd server configured/installed. If you want to run your php scripts in the command line. Then open up the command line by going to Start > Rum > Type cmd > OK The command line window will now appear. Now to change directory simply type cd followed by a space and then your new path. Eg: cd ../../php OR cd C:\php Now press enter and it should now read: C:\php> The ../ means goes one higher in directory tree. How come you have two installation of PHP? Only one will do. Delete the one your are not using. Quote Link to comment Share on other sites More sharing options...
wingman Posted April 15, 2007 Author Share Posted April 15, 2007 Many thanks genius I solved my problem using CLI. Can you also tell me steps using command line to finding the version of PHP, say : say, typing php -v How can I go to "ksh" mode!? Secondly, please also tell me steps "Using PHP interactively". Say, type " $ php -a " in ksh for windows. Many thanks, and your advice helps my studies greatly!!! Quote Link to comment Share on other sites More sharing options...
wingman Posted April 15, 2007 Author Share Posted April 15, 2007 Hi Genuis, I tried on my own and now can work out all "PHP Options" - finding PHP versions and PHP interactive mode. Now, I learned the way to handle options. Many thanks for your guidance and it makes my learning a "breeze" and joys. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.