Jump to content

Recommended Posts

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. ;)

 

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.

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!!! :-[

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.

 

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.