View previous topic :: View next topic |
Author |
Message |
ntloc -
Joined: 26 Feb 2004 Posts: 35 Location: UT
|
Posted: Fri Apr 02, 2004 5:43 pm Post subject: Execute PHP script in html? |
|
|
Hi, how can I execute a php script that I put in a html page? All my php scripts I downloaded require the php page for it to work, they require me to change all my html to php and I changed and it worked. But I want my page is in html format and still can execute a php scripts I put in there. Example:
<?php include("source.php"); ?>
...
...
...
<?php if($step==1) { echo($step1str); }
if($step==2) { echo($step2str); }
if($step==3) { echo($step3str); }
...
They require me to change my page to php in order for those to run and I want to keep it in html format (so I could easily change links and ...).
Any advise? |
|
Back to top |
|
 |
nquin321 -
Joined: 29 Jan 2004 Posts: 296 Location: Right Behind You
|
|
Back to top |
|
 |
Moxxnixx -
Joined: 21 Jun 2003 Posts: 1226 Location: Florida
|
Posted: Fri Apr 02, 2004 8:21 pm Post subject: |
|
|
ntloc,
Go to your console and go to Server Configuration > Advanced > CGI Parameters.
In CGI Interpreter, edit c:/php/php.exe (the pencil icon).
In the associated extensions after php, add html and htm (seperate with a space).
Press OK and restart the console.
That's it, your done. :D
Now you can keep your html extensions AND run php scripts.
Trust me, it works. :wink: |
|
Back to top |
|
 |
ntloc -
Joined: 26 Feb 2004 Posts: 35 Location: UT
|
Posted: Fri Apr 02, 2004 8:48 pm Post subject: |
|
|
hey Moxxnixx, that's awesome man. It worked. I never though it would work that way. You da man. :D |
|
Back to top |
|
 |
|