473,326 Members | 2,196 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

executing PHP program in console???

bnp
Hi All,

I am beginner to PHP.
I read that you can run PHP program in a console window.
How can I do that?

Please help me

Bhavik
Jul 17 '05 #1
3 15003
In <7d*************************@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

--
Sławek Pukło
Jul 17 '05 #2
Slawek Puklo wrote:
In <7d*************************@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

Jul 17 '05 #3
"Mark Kuiphuis" <maluka@remove_this.koekeloekoe.nl> wrote in message
news:c8**********@reader08.wxs.nl...
Slawek Puklo wrote:
In <7d*************************@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

Or in UNIX/Linux create your script with shbang:
#!/path/to/php -q
<?php
do_your_stuff();
?>
../filename[.php]
Make sure you chmod +x to your script.
Jul 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: boksi | last post by:
Hello, I am brand new to VC++.net. I am a programmer.I have successfully compiled the sample managed code 'hello world...' program. How do I execute it within Visual Studio.net or Visual C++.net....
4
by: Justine | last post by:
Hi All, How can v execute DOS command while executing Console Application written using C#, like cls,dir commnads. Thanz in Advance, Justine
15
by: Chakkaradeep | last post by:
Hi all, i have written a Service,now i want to execute another application (for eg;calc.exe) in the service....how will i perform it??... i tried using this.... /**************Executing a...
9
by: Mads W. | last post by:
I want to read an ini file which is located in the same dir as my .exe file. But how can I do that without having to have the excact same dir for all my program installations. Let me try to...
2
by: carolineb2005 | last post by:
I have compiled this simple program which accept arguments on line using System; class HelloWorld { public static void Main(string args) { Console.WriteLine("Hello ", args); } }
5
by: hlam | last post by:
I am developing a VB application using Visual Studio.NET and I need to communicate with a C program (supplying it with inputs and receiving output from it). What is the best way to do this? ...
5
by: nic | last post by:
On my system (WinXP) typing the following line into command prompt(cmd.exe) successfully scans the file test1.txt: "c:\Program Files\Grisoft\AVG Free\avgscan.exe" "c:\program...
1
by: ronaldgranados | last post by:
Hi, I developed an application that generates code to be dinamically execute with reflection. When I used reflection everything seems to work fine until I saw a handle and memory leak. ...
0
by: selvialagar | last post by:
i did a program in vc++.net for ICMP communication using sockets.But when i execute it i received a very slow response...is there any configuration to be made on the server..or any other thing?.. i...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.