Older Contests
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsPHP ContestsOlder Contests

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old August 3rd, 2002, 05:06 AM
bakertrg's Avatar
bakertrg bakertrg is offline
Contributing User
Codewalkers Regular (2000 - 2499 posts)
 
Join Date: Apr 2007
Location: Scottsdale AZ, US
Posts: 2,253 bakertrg User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 48 m 45 sec
Reputation Power: 4
Send a message via Yahoo to bakertrg
PHP on the command line?

Do I need to have a local installation to make this happen? Does anyone know if "foxserver" can be used to make a PHP .exe? I'm a programmer and database developer at my company not the server admin so I have never installed PHP on anything...

I guess I'll need to figure this out before I spend time writing an entry.

B

Reply With Quote
  #2  
Old August 3rd, 2002, 01:23 PM
jorgen jorgen is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Hardenberg, Holland<marquee>
Posts: 284 jorgen User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: PHP on the command line?

I don't understand your question, but a script that runs from the command line does not need a server. Just go to the DOS-prompt, go to your PHP directory and typ:

php.exe -f c:your_dircapture.php

Now your script will be parsed.
I hope this is an answer to your question

Reply With Quote
  #3  
Old August 3rd, 2002, 03:12 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: PHP on the command line?

not really - do we type the collands mu md etc in the command line?

Reply With Quote
  #4  
Old August 3rd, 2002, 04:17 PM
dr.Freud dr.Freud is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: <i>Trecate, Novara,</i><br><b>Italy</b>
Posts: 14 dr.Freud User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to dr.Freud
RE: PHP on the command line?

Instead of type: [in PHP directory]
php.exe -f c:absolutepathCapture.php

you can type one time only:
PATH c:dir_were_PHP_is

and then work in the Capture directory as if you were in PHP directory, so you can type:
php capture.php


Reply With Quote
  #5  
Old August 3rd, 2002, 04:26 PM
zombie zombie is offline
Codewalkers Intermediate (1500 - 1999 posts)
 
Join Date: Apr 2007
Location: serbia
Posts: 1,876 zombie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 3
RE: PHP on the command line?

for your own testing environment u don't realy have to run scripts from the command line!

here how i think is best enviroment u can set up with ur web server...

in one dir, place your judge.php script and two (or more) dirs for robot scripts..

then, when u need to start script1 from the judge.php, change dir to script1, and include('capture.php'); file...

then u can draw a grid with html (from judging script) and see what is happening -> debug / inpruve ur scripts!

u can also look ur judge.php script from the browser, and still start robot scripts from command line with exec('/path/to/php /path/to/robot-script.php'); but for me, first method is faster...

Reply With Quote
  #6  
Old August 3rd, 2002, 04:29 PM
dr.Freud dr.Freud is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: <i>Trecate, Novara,</i><br><b>Italy</b>
Posts: 14 dr.Freud User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to dr.Freud
RE: PHP on the command line?

If you give a judging script I do that!!!
I think in this script that "the Simplest is the best".

Reply With Quote
  #7  
Old August 3rd, 2002, 10:37 PM
zombie zombie is offline
Codewalkers Intermediate (1500 - 1999 posts)
 
Join Date: Apr 2007
Location: serbia
Posts: 1,876 zombie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 3
RE: PHP on the command line?

i am not shure i understand u dr.Freud...

do u want my judging script or what?

if so, sorry, but it is't finished yet... and don't know if it is legal...

Reply With Quote
  #8  
Old August 3rd, 2002, 10:55 PM
dr.Freud dr.Freud is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: <i>Trecate, Novara,</i><br><b>Italy</b>
Posts: 14 dr.Freud User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to dr.Freud
RE: RE: PHP on the command line?

Quote:
i am not shure i understand u dr.Freud...

Sorry, my english is poor! :rolleyes:

Quote:
do u want my judging script or what?

I say this only ironically!
Thankx for the reply Zombie, see you in the final match!

Reply With Quote
  #9  
Old August 4th, 2002, 12:15 PM
jorgen jorgen is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Hardenberg, Holland<marquee>
Posts: 284 jorgen User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: PHP on the command line?

A reply to Anonymous:

No you don't type the commands on the command line, you only use the command line to parse your script. So you'll have to open a stream with move.txt

Reply With Quote
  #10  
Old August 5th, 2002, 03:25 AM
zombie zombie is offline
Codewalkers Intermediate (1500 - 1999 posts)
 
Join Date: Apr 2007
Location: serbia
Posts: 1,876 zombie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 3
RE: RE: RE: PHP on the command line?

Quote:
dr.Freud:
Thankx for the reply zombie, see you in the final match!

i hope so... and if we do, i wont mind if u win

Reply With Quote
  #11  
Old August 5th, 2002, 08:59 AM
gatopeich gatopeich is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Madrid, Spain / Boston, MA
Posts: 96 gatopeich User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 m 54 sec
Reputation Power: 2
Send a message via Yahoo to gatopeich
RE: PHP on the command line?

Under Linux, a proper executable PHP script begins with the following lines (I think):

> #!/usr/local/bin/php
> <?php

Will it work fine under other OS's?

Reply With Quote
  #12  
Old August 5th, 2002, 07:38 PM
cjrobs cjrobs is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Southampton, England
Posts: 121 cjrobs User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via ICQ to cjrobs
RE: PHP on the command line?

You don't need to change anything in the code under Windows

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP ContestsOlder Contests > PHP on the command line?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT