Re: executing PHP program in console???

From: Mark Kuiphuis (maluka_at_remove_this.koekeloekoe.nl)
Date: 05/17/04


Date: Mon, 17 May 2004 16:14:20 +0200

Slawek Puklo wrote:
> In <7d72bcc.0405170515.54fd8e21@posting.google.com>, bnp wrote:
>
>>I read that you can run PHP program in a console window.
>>How can I do that?
>
>
> Start with reading manual.
> http://www.php.net/manual/en/features.commandline.php
>

Or do the following!!!

Windows:

Make sure the /folder.to/php.exe in your path so php.exe can be called
from any folder on your system....

For windows normally: c:\php\
For Unix/Linux /usr/local/bin (at least on my MDK system)

Then do this in console:
$ php filename.php

If you need more command-line options (for Unix/Linux) do:

$ php --help



Relevant Pages

  • Re: MySQL used with VB .NET 1.0
    ... if I switched to PHP is I'd have one foot in Windows and the other in Unix/Linux. ... I realize this is a very personal thing, but for me I find I am much more productive and comfortable in Windows. ... BTW, does PHP have a graphical forms design tool, or would I be coding in PHP/HTML with a text editor? ... that I could create a Web app simply by selecting a project type. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: MySQL used with VB .NET 1.0
    ... if I switched to PHP is I'd have one foot in Windows and the ... I have used Unix/Linux for periods several times over ... to switch to windows hosting. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: ruas in the same console
    ... instance, i mean, in the same console window, inheriting previous cmd ... something like "su" command in unix/linux ... The behavior of CMD in Windows 7 has not changed. ...
    (microsoft.public.win2000.cmdprompt.admin)
  • Re: PHP running exec() Windows program very slow in comparison to UNIX equivalent program
    ... So, by converting a VB6 DLL into a COM and calling the COM from PHP I am able to work around the speed limitations of swetest.exe, PHP, and Windows. ... I wrote a little program in VB5 that essentially does what this other compiled C Windows program does in just one of the loops that gets executed about 140 times. ... the other thing is how long it takes to to execute the program with those statements from a command prompt. ...
    (alt.php)
  • RE: phpBB Worm
    ... the getpwent function is not supported on Windows. ... it probably depends on the web server ... I looked at the decoded Perl script, ... was invoked by PHP, which should have the Web server's permissions, ...
    (Bugtraq)