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 6th, 2002, 11:58 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
Command line???

I dont get it, how do you use this command line. I have programmed a lot of php-scripts but never ever have I used something like that..

Matt, tell me:
1) What the *** is the command line?
2) Why use the command line?
3) How do you use the command line in the script?

While I'm at it, I have several questions that needs answering!
The script-file which we create, what should be written in it considering you have your own judging-script? (Do we really have to create it?) Could we not just create the file move.txt and submit that one?


Reply With Quote
  #2  
Old August 7th, 2002, 12:02 AM
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
One other thing

I forgot to add this in my posting:
Should there be only ONE command in the whole input.txt (or was it move.txt, i cant remember?)

Reply With Quote
  #3  
Old August 7th, 2002, 12:08 AM
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: Command line???


Quote:
I dont get it, how do you use this command line. I have programmed a lot of php-scripts but never ever have I used something like that..

Matt, tell me:
1) What the *** is the command line?


The command line is like DOS.

Quote:
2) Why use the command line?


So that you don't have to run the program inside the construct of a web server. That is, you're just running the straight interpretter.

Quote:
3) How do you use the command line in the script?


If you're using Windows, you just need to open a MSDOS window, CD to where your script is, and run the command php.exe (as many people have mentioned before). You might have to add the location of php.exe to your path in order to make it simple.

In Unix, PHP is usually (?) compiled as an Apache module. There is no real way to use PHP on the 'command line' when it's compile as such. You have to have had PHP compiled as a CGI in order to get a full PHP interpretter that can be run on the command line.

As other people have already mentioned, placing this at the top of your php script will allow it to run on the command line:

#!/PATH/TO/PHP

You will also have to change the executable bit. Something like:

chmod 755 yourphpscript.php

Quote:
While I'm at it, I have several questions that needs answering!
The script-file which we create, what should be written in it considering you have your own judging-script? (Do we really have to create it?) Could we not just create the file move.txt and submit that one?


While this would obviously not be accepted, even logically why would you do this? a) you would need some sort of programming to output the difference in assignment between red and white (ie. you don't know what color you're going to be until runtime). b) you would have a very dumb robot that would not be able to react to your opponent's moves.

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP ContestsOlder Contests > 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 3 hosted by Hostway