GIDForums  

Go Back   GIDForums > Webmaster Forums > Web Design Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 01-Jul-2003, 05:46
jrobbio's Avatar
jrobbio jrobbio is offline
Regular Member
 
Join Date: Jan 2003
Location: Loughborough, England
Posts: 840
jrobbio will become famous soon enough
Lightbulb

PHP in HTML


For those that don't know, I run a forum at http://bbclone.topfunwebsites.com for the BBClone PHP web counter (GPL open source project) and a topic arose that I thought others with sites that have been long indexed by the search engines and heavily linked to have prevented them from changing to .php .
Here it is in its entirety:
Quote:
PHP in HTML

Does any one know if it possible to log messages from *.html files, I have tried and does not work.

I am no programmer, and i do know that the file needs to be PHP, does any one know of a work around.

See most of our web sites are all HTML and we would like to get BBClone working as a standard.

Joe
Quote:
I'm not too hot on this subject, but would anything like this help?

http://dmmso.com/bekah/sfcc/os/phpSyntax.htm

http://www.onlamp.com/pub/a/php/2001...undations.html

If you have access to the apache/httpd conf files then have a look at this:
http://forums.devshed.com/t47073/s.html

Rob
Quote:
Thanks for the help, but it looks like their is no real way to put ?php ? in to a *.html. I tried the server conf file thing but that just makes all html downloadble.

TA
Quote:
php in html

Hello,
There's one problem: the server needs to know when a file has to be parsed through the php interpreter. This is done by assigning an extension to that binary as done in httpd.conf. So inserting code in a html file won't work unless you associate *.html with php. The only drawback would be that it may slow down performance because anything would be parsed through the interpreter.

add this to a .htaccess file or httpd.conf
AddType application/x-httpd-php .htm .html

After that you can insert the code snippet by enclosing it in php tags (see documentation for how to perform it)
Hope it helps
bye
Olliver

In essence, it IS possible to put PHP within HTML, but the drawback of performance loss is something to watch out for (even though I haven't tested it). Since it is possible to put it in a .htaccess file anyone can test this out without requiring admin rights and it could be confined to certain file areas.

Rob
  #2  
Old 02-Jul-2003, 07:41
JdS's Avatar
JdS JdS is offline
Senior Member
 
Join Date: Aug 2001
Location: KUL, Malaysia
Posts: 3,371
JdS will become famous soon enough

php in HTML files


Obviously you don't use Google for your 'researches'...

A web page here in the PHP section is No.1 (currently... and has been for a LONG time) on Google for the phrase Parsing PHP in html!

The article: http://www.desilva.biz/php/phpinhtml.html - Parsing PHP in .html Files.
  #3  
Old 02-Jul-2003, 07:45
jrobbio's Avatar
jrobbio jrobbio is offline
Regular Member
 
Join Date: Jan 2003
Location: Loughborough, England
Posts: 840
jrobbio will become famous soon enough
I'd searched for parse rather than parsing. Bit of an irony that I keep doing this
sorry
  #4  
Old 02-Jul-2003, 07:52
JdS's Avatar
JdS JdS is offline
Senior Member
 
Join Date: Aug 2001
Location: KUL, Malaysia
Posts: 3,371
JdS will become famous soon enough
Definitely something for me to research with that Overture keyword-thingy...

I thought it was a bit ironic too... but it is understandable since I should not expect you to have gone through the site with a fine-toothed comb - no need to apologise.

BTW, the bit about 'slowing down performance' is not true. It's just as much load as a regular PHP page, nothing more!
  #5  
Old 24-Jul-2003, 06:05
ckone ckone is offline
New Member
 
Join Date: Jul 2003
Location: Texas
Posts: 5
ckone is on a distinguished road
Hmmm.....sounds like your giving the same advice I tend to give everyone using Apache for Linux.....

That you must edit the httpd.config file in order make certain features active...

But most people on this furom I see just try to run before they crawl with all these posts about RPM's......

The fact is going to remain that any Webpage Designer must understand networking just about as well as a networker....

Infact I've seen some Webpage designers how know more then me about Networking...(Thats scary!!!)

Best peice of advice I can give to any computer user is all OS's have there own Services such as Webservers, DNS, DHCP, Firewalls etc..... and for each peice of software they have there own features..... I like Linux because it shuts down most security risks were as Windows leaves most Services open to attacks before you even get it out the box.....

Well good post I have to learn PHP.....So note taken....

later.....

chris
 

Recent GIDBlogPrepping for deployment by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Optimizing your web server with Turck MMCache for PHP JdS Web Hosting Forum 2 07-Jan-2004 07:48
apache2 - php cgi fehler - schleife inna Apache Web Server Forum 8 27-Nov-2003 09:55
html to php tenaki Web Design Forum 17 28-Oct-2003 16:18
[Linux] Installing PHP --with-mcrypt JdS Web Hosting Forum 0 20-Aug-2003 08:40
All the big PHP script collections that matter jrobbio MySQL / PHP Forum 5 06-Jun-2003 16:14

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 21:59.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.