![]() |
Php Question
Is it possible to include a php script in an html page? If so, what's the command to include it?
|
dont you jsut embed it like you would html?
i dunno |
depends on your server config.
you could img src it tho |
shtml
|
you can always parse your html to read as shtml
|
If you want it on client side: No
You can put javascript or (in the case of Internet Exporer) vbscript, but not php. |
Yeah, I know I can just change it to shtml and include it that way, but I don't really want to do that because my page is doing well with SEs. I don't know if changing the extention will screw that up. Anyone know?
|
YES.
Change yourpage.html to yourpage.php and add the script. It's that easy. |
PHP Code:
|
Quote:
|
Quote:
|
I'm no developer, but I know we do this quite frequently for tracking code insertion. I just asked our developer for a brief rundown:
<TonyMontana> off topic <TonyMontana> what's the preferred way to embed php in html? <TonyMontana> whilst keeping the .html extension <geek> use .htaccess or configure httpd.conf to parse .html as php, <geek> and the embed part <geek> <body><?php // phpstuff to do whatever ?></body> I hope this helps. |
AddHandler php-script .php .html
|
| All times are GMT -7. The time now is 08:58 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2026, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123