Cita:
Iniciado por pateketrueke
primero... $_GET['miduda'] NO contiene la URL completa... solo el valor GET usado...
osea....
http://host.com?miduda=ejemplo DEVUELVE solo "ejemplo" (sin comillas)
al usar un switch() NO te va a funcionar si no entien des esta diferencia.... en el CASE podrias comparar solo los valores pasados.... NO URL's completas.... vale??
a estudiar!
tu eres el que tienen que estudiar ya lo solucione asi era mira
Código PHP:
<?
$variableurl = "http://".$_SERVER['SERVER_NAME'].$port.$_SERVER['REQUEST_URI'];
echo $variableurl;
switch ( $variableurl) {
case "http://www.mipagina.com.es/index.php?main_page=index&cPath=cPath=".$_GET["cPath"]:
require($template->get_template_dir('tpl_main_page.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_main_page2.php');
break;
case "http://www.mipagina.com.es/index.php?main_page=product_info&cPath=".$_GET["cPath"]."&products_id=".$_GET["products_id"]:
require($template->get_template_dir('tpl_main_page.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_main_page2.php');
break;
default:
require($template->get_template_dir('tpl_main_page.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_main_page.php');
}
?>
asi que la proxima ves estudia tu primero antes de decir estudia mocozazo!!