Z-blogPHP determina la URL de la página actual

function 主题id_getUrl(){     		 				
    $pageURL = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http";	$pageURL .= "://";	$pageURL .= $_SERVER["SERVER_NAME"];	if ($_SERVER["SERVER_PORT"] != "80" && $_SERVER["SERVER_PORT"] != "443") {		$pageURL .= ":" . $_SERVER["SERVER_PORT"];
	}      	$pageURL .= $_SERVER["REQUEST_URI"];    	  	 			 	
    return $pageURL;     	     	
}

以上代码可以同时支持http和https

image.png

Etiquetas:Z-blogPHP
No me gusta1

Enlace para este artículo:https://es.finchui.com/zblog-course/13.html

Comentarios de internautas

Supongo que te gusta

Mercancías populares
Artículo popular
Etiquetas populares
Etiquetas relacionadas
FinchUI Store versión Zona Especial Especial de Hong Kong

Compartir

Copiar el link

Estudio Lan XingAñadir amigos

Horario de trabajo: 9: 00 - 22: 00
Sábado y domingo: 14: 00 - 22: 00
wechat
Escaneo de código para agregar servicio al cliente WeChat