I have the following código
to get pages in my content with url
:
<?php
$url = (isset($_GET['url'])) ? $_GET['url'] : 'home';
$url = array_filter(explode('/', $url));
$file = './pages/' . $url[0] . '.php';
if (is_file($file)) {
include_once $file;
} else {
include_once './pages/404.php';
}
?>
But then the question arose, "?", what better method to do this, with php
or ajax
? Which is more secure, which interferes more with the SEO
of WebSite? Which is more agile?