Execute PHP script in html?

 
Post new topic   Reply to topic    Aprelium Forum Index -> PHP
View previous topic :: View next topic  
Author Message
ntloc
-


Joined: 26 Feb 2004
Posts: 35
Location: UT

PostPosted: Fri Apr 02, 2004 5:43 pm    Post subject: Execute PHP script in html? Reply with quote

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 View user's profile Send private message Visit poster's website
nquin321
-


Joined: 29 Jan 2004
Posts: 296
Location: Right Behind You

PostPosted: Fri Apr 02, 2004 7:52 pm    Post subject: Reply with quote

use the iframe tag to go to your php scripts
_________________
How many forum members does it takes to change a light bulb?
Back to top View user's profile Send private message
Moxxnixx
-


Joined: 21 Jun 2003
Posts: 1226
Location: Florida

PostPosted: Fri Apr 02, 2004 8:21 pm    Post subject: Reply with quote

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 View user's profile Send private message Visit poster's website
ntloc
-


Joined: 26 Feb 2004
Posts: 35
Location: UT

PostPosted: Fri Apr 02, 2004 8:48 pm    Post subject: Reply with quote

hey Moxxnixx, that's awesome man. It worked. I never though it would work that way. You da man. :D
Back to top View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> PHP All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group