Jump to content

New site/ some questions


pedro84

Recommended Posts

WElcome Everyone!

I wanna to ask You some questions:

index.php
[code]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>Michael-Schenker.com</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1250"/>
<link href="style.css" rel="stylesheet" type="text/css"/>
</head>


<?php
include('includes/header.php');
?>

<?php
include('includes/menu.php');
?>

<?php
include('includes/content.php');
?>

<?php
include('includes/footer.php');
?>


[/code]
ew. included file

[code]<?php

echo "<div id=\"footer\"><p id=\"copy\">Copyright 2006 Michael-Schenker.com</p></div>\n";
echo "</div>\n";
echo "</div>\n";

echo "</body>\n";
echo "</html>\n";

?>[/code]

Am I doing it right? Is it good way to make my site validating?
Link to comment
Share on other sites

You don't have to go in and out of PHP for the includes.
[code]<?php
include('includes/header.php');
include('includes/menu.php');
include('includes/content.php');
include('includes/footer.php');
?>[/code]

Everyone has his or her preference when writing HTML code from php. Some people prefer the HEREDOC method:
[code]<?php
echo <<<EOF
<div id="footer"><p id="copy">Copyright 2006 Michael-Schenker.com</p></div>
</div>
</div>
</body>
</html>
EOF;?>[/code]

Some people prefer to use one long string:
[code]<?php
echo "<div id='footer'><p id='copy'>Copyright 2006 Michael-Schenker.com</p></div>
</div>
</div>
</body>
</html>\n";?>[/code]

You can write code that won't validate no matter you chose to write it.

Ken
Link to comment
Share on other sites

I fixed them. I have next question:

How to make structure as follow:
_root =>index.php
data => files ex. discography

How to make them? I tried but I got errors that cannot find path:|

Sorry for my  maybe stupid questions but I want to make it good.

Thank You once again.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.