GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Php Question (https://gfy.com/showthread.php?t=396993)

Houdini 12-01-2004 10:30 PM

Php Question
 
Is it possible to include a php script in an html page? If so, what's the command to include it?

Chris 12-01-2004 10:30 PM

dont you jsut embed it like you would html?
i dunno

Napolean 12-01-2004 10:33 PM

depends on your server config.

you could img src it tho

Warden 12-01-2004 10:33 PM

shtml

arial 12-01-2004 10:33 PM

you can always parse your html to read as shtml

Cogitator 12-01-2004 10:36 PM

If you want it on client side: No

You can put javascript or (in the case of Internet Exporer) vbscript, but not php.

Houdini 12-01-2004 10:37 PM

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?

The Apprentice 12-01-2004 10:42 PM

YES.


Change yourpage.html to yourpage.php and add the script.

It's that easy.

brizzad 12-01-2004 10:42 PM

PHP Code:

<script type="text/javascript" src="http://www.makesomecash.net/include.php"></script>

is a script im using

Houdini 12-01-2004 10:45 PM

Quote:

Originally posted by brizzad
PHP Code:

<script type="text/javascript" src="http://www.makesomecash.net/include.php"></script>

is a script im using

Thanks, I'll try that.

Houdini 12-01-2004 10:49 PM

Quote:

Originally posted by The Apprentice
YES.


Change yourpage.html to yourpage.php and add the script.

It's that easy.

The whole point is to keep it an .html page.

frankfortuna 12-01-2004 10:54 PM

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.

JSA Matt 12-01-2004 11:10 PM

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