<update> This problem has been fixed largely thanks to eKstreme. My last post in this thread sums up what worked for me. </update>
Note: I only care about *nix (specifically, Linux) per this post.
Locally there is a computer programming competition in which I competed last year, using C++. I don't really know C++; PHP is my thing. So I wrote the event coordinator, and to my delight, he said that he'd try and allow use of PHP along with BASIC/Python/Java/C/C++. However, he's not used to PHP.
The program works like this:
There is a piece of contest software, RockTest, that allows users to type their program in a text editor, and then automates compiling (if necessary). Then an input file with test data will be sent as standard input to the program; the output will be visible in the RockTest software (again, using standard output to pipe to RockTest, I believe).
I'm not really familiar with Unix or Linux.
How would one run a PHP file *while* sending it a file as input?
Do you have to "chmod" the PHP file first?? I guess that could be set up in the RockTest software instead of actually compiling the PHP. But does it need done?
Also, I assume we'd need a line like:at the top?Code:#!/usr/bin/php
Any light you could shed would be much appreciated. Thanks.![]()