Hello,
I want to organize my php files so i will know where everything is. I want some feedback.
This is my root:
classes
# class.php
# another_class.php
functions
# function.php
# another_function.php
config
# config.php
files
# footer.php
# header.php
# left.php
# right.php
# top.php
images
# logo.gif
# style.css
pages
# about.php
# contact.php
# index.php
index.php
about.php
contact.php
On index.php I have got
On pages/index.php I have got
On files/header.php I have got
I want to organize my php files so i will know where everything is. I want some feedback.
This is my root:
classes
# class.php
# another_class.php
functions
# function.php
# another_function.php
config
# config.php
files
# footer.php
# header.php
# left.php
# right.php
# top.php
images
# logo.gif
# style.css
pages
# about.php
# contact.php
# index.php
index.php
about.php
contact.php
On index.php I have got
PHP:
<?php
$page_title = "title of site";
$page_keyword = "keywords";
define('_This_IS_not-FOR_YOU', TRUE);
include "config/config.php"; // get config
include "files/header.php"; // get header
include "files/top.php"; // get topmenu
include "pages/index.php"; // get content
include "files/footer.php"; // get footer
?>
On pages/index.php I have got
PHP:
<?php defined('_This_IS_not-FOR_YOU') or die('Direct access not allowed.'); ?>
<table width="800" border="1" bgcolor="#FFFF00">
<tr>
<td>Index</td>
</tr>
</table>
On files/header.php I have got
PHP:
<?php defined('_This_IS_not-FOR_YOU') or die('Direct access not allowed.'); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo $page_title; ?></title>
<link type="text/css" rel="stylesheet" href="images/style.css">
</head>
<body>





