include command

hello!
im working on a website and im using dreamweaver cs3. i have an index page with include commands and it looks like this
[php]<?php include("zaglavlje.html");?>

<?php include("Linkovi.php");?> <?php include("Sadrzaj.php");?> <?php include("podnozje.html");?>[/php]

in the pages included i obviously have some content and when i preview my site in dreamweaver it looks great, but when i try to open it up in a browser, nothing shows up! why is this so?
however, if i place all of my content within the index page and dont use the php tags it looks good in dreamweaver as well as in the browser!
can anyone help me???

When you view it in your browser, are you using a web server with PHP, or are you looking at the file. If the file path looks like this:

file:///C:/Some/Folder/File.php

Then your browser will not process the code and therefore nothing will be displayed. You need to view the file from a local web server (or remote web server):

http://localhost/File.php

If you don’t have a web server installed on your computer, you can use something like Xampp (for Windows).

Have you setup apache and php on ur localhost?

Sponsor our Newsletter | Privacy Policy | Terms of Service