Web Hosting Talk







View Full Version : PHP Question


ProSam
11-09-2001, 01:11 AM
Hi guys,
I need a little help.
I'm tryng to use a php hit counter that also allows users to see how many people are online. The thing is that I need to use a .php extension for the code to work properly.

How do I get around this?
I was able to use .htacess before for a phpPoll I added to the site, that worked fine but it isn't working for this.

Is there another line I could add to the .htacess for this to work?

Here's how it should look: http://www.lhdb.com/test.php
But it looks like this: http://www.lhdb.com/home.shtml underneath the menu and poll.

JustinK
11-09-2001, 01:43 AM
<?php echo(phphitsShowHits(0)); ?>

You're using PHP code in a non php document.

ProSam
11-09-2001, 02:52 AM
Yes, but The line in the .htaccess line tells PHP to
also parse HTML docs. But for some reason it is not doing it.

The poll works fine. Why is the counter not working? That's my question.

chuckt101
11-09-2001, 05:38 PM
I didn't know you can use htaccess to make php parse html documents... :eek:

delemtri
11-09-2001, 05:45 PM
Make sure you have it set to parse .shtml docs.

JustinK
11-09-2001, 06:37 PM
Yep, you can make it parse just about anything through .htacess.

ProSam
11-10-2001, 04:33 PM
Actually adding .shtml to the .htaccess makes the site download automatically, I don't know why but it does.

But I did get it to work so thanks for the help.