PHP Code:<?php
if (isset($_GET['article'])) {
$articleFile = $_GET['article'].'.php';
if(file_exists($articleFile)) {
ob_start();
include($articleFile);
$content = ob_get_contents();
ob_end_clean();
} else {
$title = 'Article Not Found';
$content = '';
}
} else {
include('default.php');
}
?>
Much easier to work with.PHP Code:
<?php $title = 'You are reading Article 1'; ?>
<h2>Article 1</h2>
<p>This is Article 1...</p>



Reply With Quote





Bookmarks