Jump to content

.shtml editing.


Kristian_C

Recommended Posts

Hey, im verry tired of getting so ugly shtml errors when etc page is offline ++and i wondered, is it possible to insert direct sql/php/html maybe js? is this possible or must it be runned another way then shtml files, if thats the case, how to do it?->Kristian_C.

Link to comment
Share on other sites

do you mean like, templated pages using includes?my way of doing it is to create a file called "templates.php" or something. have a few functions within it, mainly "writeHeader($title)" and "writeFooter()". The variable $title obviouslly to change the title of the page.then include templates.php, and run the functions where i want them.

Link to comment
Share on other sites

do you mean like, templated pages using includes?my way of doing it is to create a file called "templates.php" or something. have a few functions within it, mainly "writeHeader($title)" and "writeFooter()". The variable $title obviouslly to change the title of the page.then include templates.php, and run the functions where i want them.
ERROR 404 and stuff like that, like if you open a link, and the site is down, you see : cant find server ++ those files are saved as .shtml .. i know it is possible to request IP/Browser/url +++ in those but then it must be like this :
<!--#echo var="HTTP_REFERER" --><!--#echo var="REMOTE_ADDR" --><!--#echo var="REQUEST_URI" -->

and i want to have like etc:

<?$er=mysql_query("SELECT * FROM errors WHERE errortype='404'");$re=mysql_fetch_object($er);echo"$re->main";?><br><br><?echo"$re->errortext"?><br><br><br><br><br><br><?echo"$re->foot";?>

Just dont know if im allowed to use regular php in there becouse i really dont know how .shtml operates..got any suggestions?.->Kristian_C.

Link to comment
Share on other sites

Are you talking about creating a custom error page? Or displaying another version of the page if you get a 404 error?
The main problem is just to add php to the error page. tried normal but seems like it dont work, so i dont think it is possible to use php.->Kristian_C
Link to comment
Share on other sites

Server info : Operating system Linux Kernel version 2.6.9-42.0.3.ELsmp Machine Type i686 Apache version 1.3.36 (Unix) PERL version 5.8.7 PHP version 4.4.4 MySQL version 4.1.21-standard hope that helps.->Kristian_C.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...