PDA

View Full Version : is this php correct?



is0lized
March 2nd, 2002, 01:29
<?php include("page.html");
close;
?>

i want it to redirect to that page fast, will this do it?

spec
March 2nd, 2002, 01:48
why do u have close?

is0lized
March 2nd, 2002, 01:54
i saw it before, basicly i want a redirect page...

i got a forum that wont redirect right away


<ADD>

ah heres teh code i needed

<?
header ("Location: main.php");
exit;
?>

keith
March 2nd, 2002, 04:24
index.php:
<?
include("main.php");
exit;
?>

is0lized
March 2nd, 2002, 04:28
i stole the code off the wbb index.php page that came in teh zip :biggrin2:

niv
March 2nd, 2002, 15:44
Using header(); is better if you want to disregard the rest of the index.php file.

kingage
March 5th, 2002, 14:59
rename the page.html to page.php and add this:

<?
exit;
?>

keith
March 5th, 2002, 15:55
yes but using include() will avoid forwarding to main.php. so people will see /forums/ rather than /forums/main.php

it's all a question of looks and preference really...

niv
March 5th, 2002, 20:52
Originally posted by kingage
rename the page.html to page.php and add this:

<?
exit;
?>
Who said you couldn't include an HTML file? :confused:

keith:

<?
include "http://yourdomain.com/forums/main.php?".$QUERY_STRING;
?>

That or make an .htaccess file and just put DirectoryIndex main.php in it.
:biggrin2:

keith
March 5th, 2002, 21:45
you don't have to include the query string because all links in the forum link to main.php anyhow...

Kaliber
March 6th, 2002, 00:13
Is this to do with wbb?

keith
March 6th, 2002, 16:02
pretty much