Reply to Re: PHP in MS-DOS

Your name:

Reply:


Posted by Jason Barnett on 01/17/05 17:33

Shawn McKenzie wrote:
> I have not been successful with running PHP under DOS (no windows). Is
> this possible?
>
> TIA,
> Shawn

For windows specific questions you are usually better off asking on the
php-windows list.

Yes this is possible. What is probably happening is your PHP script is
executing (and ending) so quickly that you don't see the output. Try this:

C:\WINNT\SYSTEM32\CMD.EXE /K "C:\PHP\php.exe -f yourfile.php"

Or if you are lazy like me, try this:
- Open Windows Explorer
- Go to Tools -> Folder Options
- Go to File Types
- Find the entry for PHP and hit "Advanced"
- Hit "New"
- For the name enter something like CLI
- For the application use C:\WINNT\SYSTEM32\CMD.EXE /K "C:\PHP\php.exe
-f %1"

At this point you can decide to make this the default action for .php
files. But at a minimum this should enable you to right-click and run a
script from the command line.

Merry Christmas (a month late even :)

--
Teach a person to fish...

Ask smart questions: http://www.catb.org/~esr/faqs/smart-questions.html
PHP Manual: http://www.php.net/manual/en/index.php
php-general archives: http://marc.theaimsgroup.com/?l=php-general&w=2

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация