|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
[Trilite] For Beginners
OK ... here goes ...
I know I'm just a beginner, but this Trilite thing fascinates me ... so bear with me. So I create a program called trilite.php If I want to test it out using your program judge.php, I would need to duplicate it so it would emulate there being two programs against each other. Each program would be in it's own directory. Each program is named trilite.php Now, how does judge.php work? Would I run judge.php and it handles the initiation and sending moves etc to each program? Looking at judge.php, I'm just not sure how it knows where the programs are located and how it actually sends the variables. I must be way lost on this ... Help us PHP beginners on getting a grip on this using this post. All other PHP experts can use the other post for their questions. Thanks |
|
#2
|
|||
|
|||
|
RE: [Trilite] For Beginners
In the judge.php script there are two variables you can set:
$player[1] = 'http://localhost/etc/player1.php'; $player[2] = 'http://localhost/etc/player2.php'; This is where you set where the two scripts are. The start judging, call the judging script with ?start=1 attached to it, like so: http://yourserver.com/judge.php?start=1 Then, the judge.php script will produce a next link for you to click and step through each move... |
|
#3
|
|||
|
|||
|
RE: [Trilite] For Beginners
I get the following failures on the line 80
with the implode(). My player1.php does get the variables and then I echo my lastmove. Maybe that's where I'm going wrong ... or, is it something with my webhost that won't allow this to work. (www.netfirms.com) Warning: php_hostconnect: connect failed in /mnt/web_a/d13/s46/a000kg5t/www/judge.php on line 80 Warning: file("http://www.abcfireprotection.com/player1.php?start=1") - Bad file descriptor in /mnt/web_a/d13/s46/a000kg5t/www/judge.php on line 80 Warning: Bad arguments to implode() in /mnt/web_a/d13/s46/a000kg5t/www/judge.php on line 80 |
|
#4
|
|||
|
|||
|
RE: [Trilite] For Beginners
Probably safe-mode restriction; that or old version of PHP without http:// handler
I would recommend you install PHP on your home computer and turn off safe mode. Then you won't have to worry about that. It does take some time to install apache, though... not super-ez, but maybe a couple hours total (mySQL is a breeze to install as a service on Windows and PHP has a windows binary installer) |
|
#5
|
|||
|
|||
|
RE: [Trilite] For Beginners
Oh yes, that darn time consuming apache installation...
Honestly, after executing the installer and answering some questions in the setup wizard you have to manually copy two files and add 3 lines to your configuration file to get your PHP working. Which is very well documented in the readme of PHP. I just cannot see the difficulties in installing apache on windows machines. Compared to the complications that occur after just altering the default installation path of mysql or the choice whether to use PHP as a SAPI module or CGI and following the according instructions the apache setup is absolutely painless and straightforward. Maybe the most demanding part of installing apache is finding the right file to download at apache headquarters. |
![]() |
| Viewing: Codewalkers Forums > PHP Contests > Older Contests > [Trilite] For Beginners |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|