Re: Can i run php script using command prompt in any location by typing scriptname.php

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Ravi Joshi <ravi.joshi53@xxxxxxxxx>:

Hi,
       I have downloaded ZendServer-CE-4.0.3-Windows_x86.exe(49.6 MB) and installed it in C:\Program Files\Zend derectory .Whenever i want to run any php script i have to put my php script in C:\Program Files\Zend\ZendServer\bin directory and then by the command prompt first i goto in C:\Program Files\Zend\ZendServer\bin location and then i type php scriptname.php. after doing this i get the output from php script.       I want to ask that can i run my php script by simply double clicking or by command prompt only by typing scriptname.php in any location.

Yes and no.

No, you can't double click it.
Yes, you can if you set up the proper association with the .php extension.

No, you can't just type the scriptname.php at the command line to run the script. Yes, if you have the path to PHP executable in your PATH variable, then you can type...

   > php scriptname.php

Walter--
...that's the thing about people who think they hate computers.
What they really hate is lousy programmers.
   - Larry Niven and Jerry Pournelle in "Oath of Fealty"


--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux