Forum Moderators: coopster

Message Too Old, No Replies

how can i chage html files to PHP files?

need to change html to php for my site

         

Ericksito

8:34 pm on Jun 8, 2004 (gmt 0)

10+ Year Member



Parse error: parse error in /home/content/E/r/i/Erick/html/index2.php on line 128

This what i get when i rename it?

Robino

8:40 pm on Jun 8, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member




Is PHP installed on your server?

Ericksito

8:51 pm on Jun 8, 2004 (gmt 0)

10+ Year Member



nope I just have Databases
That i used it for PHPBB Forums

Where can i get it?

jatar_k

8:52 pm on Jun 8, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld Ericksito,

what is the actual code on line 128?

maybe add a line or two before as well and indicate which is line 128

I am guessing that if you are getting parser errors then php is installed.

Ericksito

8:55 pm on Jun 8, 2004 (gmt 0)

10+ Year Member



I'm adding a news ticker and Whois online

the code is <?php include "ticker.php";?>

jatar_k

11:32 pm on Jun 8, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



is that the whole error that it gave?
Just "Parse error ....."

is the rest of the page just html?

What if you call ticker.php directly in your browser? anything happen?

tqatsju

11:54 pm on Jun 8, 2004 (gmt 0)

10+ Year Member



should be

<?php
include("ticker.php");
?>

also remember you have to have ticker.php in the same directory as the file above or php will not find ticker.php

jatar_k

11:56 pm on Jun 8, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



<?php include "ticker.php";?>

or

<?php
include("ticker.php");
?>

will function exactly the same. The parentheses are not required and the inline format is also fine.

ogletree

12:10 am on Jun 9, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



You should keep your .html files if they are indexed in Google there is no reason to lose all that. Just put
AddType text/x-server-parsed-html .shtml .html .htm
in your .htaccess file.

Ericksito

3:28 am on Jun 9, 2004 (gmt 0)

10+ Year Member



How do i create a .htacess i think i delelet from frontpage?

ogletree

12:12 pm on Jun 9, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



go to the root of your site create a text file with the name .htaccess and you are done. If you are on windows just create a htaccess file and ftp it to your server then rename it in your ftp program to .htaccess

.htaccess does not work on windows based servers.

Ericksito

2:15 pm on Jun 9, 2004 (gmt 0)

10+ Year Member



oh i got the file so now a just add addtype .html stml.