Forum Moderators: coopster

Message Too Old, No Replies

Include simple php into html

Help me :)

         

wariental

11:59 pm on Mar 12, 2006 (gmt 0)

10+ Year Member



I have a simple php script that shows the date, I want to put this file into an html page without changing the .html to a .php . I have seen it done on other web pages but i am very new to php and do not know how.

I have my website hosted through yahoos web hosting.
If that at all makes a difference.

Thank you.

wariental

3:06 am on Mar 13, 2006 (gmt 0)

10+ Year Member



"Edit the .htaccess file
How? Well, here's what you should do:

Go to your WWW root, usually it looks like this -
path: /home/username/public_html

Look for the file named .htaccess. If it's not there, create a blank page using NotePad or Dreamweaver and save it as .htaccess

Now edit this file by adding the following lines:

code:

RemoveHandler .html .htm
AddType application/x-httpd-php .php .htm .html
Save and close the .htaccess file. Upload it to your webserver (to your WWW root) and that's it!"

I am confused. First of all I cant find a file named .htaccess , second you cant create a page called .htaccess because it starts with a period.
So how do I do this?

maccas

3:11 am on Mar 13, 2006 (gmt 0)

10+ Year Member



Name it htaccess.txt and uploaded then rename it to .htaccess

wariental

3:37 am on Mar 13, 2006 (gmt 0)

10+ Year Member



nope tells me its an invalid name.

Once again Iam using yahoo web hosting, their simple plan. Is there a possibility they dont offer this option?

I mean they should lol.. I know iam jus doing something wrong here

wariental

4:44 am on Mar 13, 2006 (gmt 0)

10+ Year Member



Wow I really liked yahoo webhosting, their interfaces, their ease of use than this..

".htaccess (Hypertext Access)
The name .htaccess refers to the main configuration file for Apache, a popular open-source HTTP server. The .htaccess file can be used to create custom error pages and web page redirects, set up password protection, enable SSI, and more. Yahoo! does not currently allow you to upload .htaccess files to your account. For other customization options, we recommend the Custom Error Pages and password-protection features available in your Web Hosting Control Panel. "

Iam guessing there is no other way to do what I want to now?

mifi601

4:51 am on Mar 13, 2006 (gmt 0)

10+ Year Member



is php even running on yahoo?

wariental

5:31 am on Mar 13, 2006 (gmt 0)

10+ Year Member



yes, php, perl..

Like I said, I've been very impressed by yahoos user interface and ease of use. However, not so impressed by my new discovery.