Hello, i am kind of new in programming and now i have a question. I tried to figure it out on my own, but... I created my webpage solely with html. Since i don't want to change my navbar on every page when i have some minor changes, i tried to implement it with php. I did the navbar kind of like this: <div> <ul> <li>link1</li> <li>link2</li> </ul> </div> HTML: In the body of my page i wrote this : <?php include('navbar.html);?> PHP: I changed my page from default.html to default.php. But when i now upload my webpage to the server, it will not get online. Where is the mistake? Is there a fault in my code or does it have to do with my server? My server definitely supports php...is there anything i have to change before i can make php pages visible..like a database or sth.???? Sorry for this probably easy question, but just started learning php. Thanks a lot, Maurizio
You missed a ' Make sure the file is in the same directory as the navbar, and make sure navbar is .html, not .htm <?php include('navbar.html');?> Code (markup):
I added the ' but i still have the same problem. The weird thing is that the whole page is not visible and i just get a "page not found". Do I have to change any settings in my server menu? i.e. My directory is called html. Within this directory there is a folder called php_uploads. Do i have to save my php pages in this folder? Before i did everything in html and it worked perfectly. When i change my pages to php they will not be visible anymore Thanks to everyone who can give me some helpful hints! Maurizio
er, this may be an obvious thing to try but humour me... are whereas it used to be that the default directory index was default.html / htm, it does not follow that the php equivalent is also default.php have you tried actually going to hxxp://yourdomain/default.php? or renaming to index.php? but yeah, if PHP has not been compiled correctly / crashes / application type handler for .php not setup, you'd see blank pages. But: you won't see 'page not found' - which leads me to believe you are not trying the correct filename.
Make sure you have installed an apache server, that's the result to having no apache active.. Good luck