English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories
0

At begining of index.html I have put this:

Why will it not do it?

2006-10-13 11:42:19 · 6 answers · asked by Anonymous in Computers & Internet Programming & Design

6 answers

Forgot to take PHP 101. did we?

PHP is not a client side language, it will not work like javascript.

The correct syntax would be

include_once('config.php');
blah...
?>

notice the opening and closing syntax of php.

2006-10-13 11:57:15 · answer #1 · answered by Sanjay 3 · 0 0

To run a php script, your page needs to end the page with .php and not .html. You need to do this so that that the server will know how to translate the page. So, your page should be index.php not index.html.

Secondly, you should make the call like this:

include_once("config.php");
checkedLoggedIn("yes");
?>


etc....

2006-10-15 12:36:56 · answer #2 · answered by sfmf 2 · 0 0

Adding to the first response. A more complete beginning tag would be

2006-10-13 13:00:38 · answer #3 · answered by Ken H 4 · 0 0

Your file should be named index.php, not index.html.

Also, disregard Sanjay's remark about not using