Im confused

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Ghezzo
Forum Newbie
Posts: 1
Joined: Wed Nov 25, 2009 11:26 am

Im confused

Post by Ghezzo »

Hey there, I have been working on a real simple website in HTML for some days now, but when the include() didn't work with HTML, I felt I might try some PHP.
I made my index.php, put this code in it:

Code: Select all

<link href="index.css" type="text/css" rel="stylesheet" />
 
 
<title>Test</title>
 
 
<div id="topbar">
<? include "logged.php"; ?>
</div>
<div id="body">
</div>
and I was thinking it will never work, I uploaded it on my website, went on it and it was working?
Looked just like the HTML site but it was a PHP file.

I got other PHP files to run some of the features on my site though.



And now, is it even secure to do this? As it's just basic HTML code put in a PHP file.






Sorry if I posted in the wrong area.
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: Im confused

Post by Christopher »

You might want to try:

Code: Select all

<?php include "logged.php"; ?>
(#10850)
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Re: Im confused

Post by superdezign »

It doesn't sound like it wasn't working, ~arborint. :3
And yes, that is secure. People on the front-end won't even know what file you included.
Post Reply