Home News Forum Articles
  Welcome back Join CF
You are here You are here: Home | Forum | PHP within HTML pages


You are currently viewing our boards as a guest which gives you limited access to view most of the discussions, articles and other free features. By joining our Virgin Media community you will have full access to all discussions, be able to view and post threads, communicate privately with other members (PM), respond to polls, upload your own images/photos, and access many other special features. Registration is fast, simple and absolutely free so please join our community today.


Welcome to Cable Forum
Go Back   Cable Forum > Computers & IT > Internet Discussion

PHP within HTML pages
Reply
 
Thread Tools
Old 09-08-2004, 21:50   #1
I've been here before?
 
Tricky's Avatar
 
Join Date: Jun 2003
Location: I am house...
Services: $KY+, Vodafone USB Stick Broadband!
Posts: 2,212
Tricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful one
PHP within HTML pages

Might be a daft question?:

Can I have a .htm or .html page with embedded php code?
I am currently trying to test this with some very basic code:

PHP Code:
<body>
<? echo("Hello"); ?>
</body>
This results in nothing on screen saved as a .htm or html but works on a .PHP save - this is on my own server but also on www.i-websolutions.co.uk

Either that or can someone confirm that .php pages will be indexed by search engines/robots/etc. including the follow links
__________________
There are only 10 types of people in the world: Those who understand binary and those who don't...
Better Hosting packages? - I'd offer you a deal and my domain is now up
Tricky is offline   Reply With Quote
Old 09-08-2004, 22:01   #2
cf.mega poster
 
Bifta's Avatar
 
Join Date: Jul 2003
Location: Derry
Posts: 7,597
Bifta has a nice shiny starBifta has a nice shiny star
Bifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny star
Re: PHP within HTML pages

PHP code will only run if the file suffix indicates it's a PHP file, the same rule for SHTML and SSI. PHP files do however get indexed by search engines, certainly google indexes them.
Bifta is offline   Reply With Quote
Old 09-08-2004, 22:04   #3
I've been here before?
 
Tricky's Avatar
 
Join Date: Jun 2003
Location: I am house...
Services: $KY+, Vodafone USB Stick Broadband!
Posts: 2,212
Tricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful one
Re: PHP within HTML pages

Cheers m8 - I'll stop pulling php.ini and httpd.conf in pieces now!
It was the indexing that I was bothered about - I am assuming that META tags in PHP files will be referenced in the same manner?
__________________
There are only 10 types of people in the world: Those who understand binary and those who don't...
Better Hosting packages? - I'd offer you a deal and my domain is now up
Tricky is offline   Reply With Quote
Old 09-08-2004, 22:07   #4
cf.mega poster
 
Bifta's Avatar
 
Join Date: Jul 2003
Location: Derry
Posts: 7,597
Bifta has a nice shiny starBifta has a nice shiny star
Bifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny star
Re: PHP within HTML pages

Quote:
Originally Posted by Tricky
Cheers m8 - I'll stop pulling php.ini and httpd.conf in pieces now!
It was the indexing that I was bothered about - I am assuming that META tags in PHP files will be referenced in the same manner?
Yeah, there's no reason why they wouldn't be, the spider/engine will just read whatever client side code it can get at.
Bifta is offline   Reply With Quote
Old 09-08-2004, 23:17   #5
cf.mega poster
 
Join Date: Jun 2003
Age: 29
Posts: 6,273
Richard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze array
Richard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze array
Re: PHP within HTML pages

Actually all you need to do is put this in a .htaccess file and upload it to the root of your public webspace:

AddType application/x-httpd-php .html .htm
Richard M is offline   Reply With Quote
Old 10-08-2004, 10:30   #6
I've been here before?
 
Tricky's Avatar
 
Join Date: Jun 2003
Location: I am house...
Services: $KY+, Vodafone USB Stick Broadband!
Posts: 2,212
Tricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful oneTricky is the helpful one
Re: PHP within HTML pages

Quote:
Originally Posted by Richard M
Actually all you need to do is put this in a .htaccess file and upload it to the root of your public webspace:

AddType application/x-httpd-php .html .htm
Worked a treat - Excellent one m8
__________________
There are only 10 types of people in the world: Those who understand binary and those who don't...
Better Hosting packages? - I'd offer you a deal and my domain is now up
Tricky is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


All times are GMT +1. The time now is 09:21.


Links
Google
 
Web www.cableforum.co.uk


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0
Copyright © 2003 - 2008, Cable Forum.
(s204569790.onlinehome.info)