Jump to content

Páginas dinâmicas


Oreo

Recommended Posts

Boas!

Tenho o seguinte código:

<?php
$region = $_GET['region'];
$div = $_GET['div'];
$artist = $_GET['artist'];
if (!$region)
$region = "uk";
if(!strpos($region, ".") &&!strpos($region, "/")
{
if (!$div)
$path = ("region/div/".$div.".php");
if(!$artist)
$path = ("region/".$region.".php");
else
$path = ("region/div/artist/".$artist.".php");
if(file_exists($path))
include ($path);
else
include("region/".error.".php");
}
else
include("region/".error.".php");
?>
 

O que pretendo com este código é executar páginas dinâmicas, em que na pasta div tenha um ficheiro em php, e esse ficheiro php vai "estruturar" o próximo ficheiro php na pasta artist.

Por exemplo, roster.php?region=uk&div=Photography&artist=nome

O roster, página inicial, vai chamar na pasta region o ficheiro uk.php. No ficheiro uk há botões de imagem para executar uma geleria. No entanto, ele irá chamar o php Photography da past div, e este php tem a sua estrutura de visualização, ou seja o esqueleto. Por último, a pasta artist carrega o nome.php com as fotografias.

Cumprimentos

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. 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.