Dudas con css o php

Hola
Recién me estoy iniciando en el desarrollo de páginas web y me surgen algunas preguntas que espero que puedas responder.
Necesito revisar unas páginas web en el que tengo el siguiente código en un archivo llamado styles.php
if (!isset($themename)) {
$themename = NULL;
}
$nomoodlecookie = true;
require_once("../../config.php");
$themeurl = style_sheet_setup(filemtime("styles.php"), 300, $themename);
Que significa el $themeurl = style_sheet_setup(filemtime("styles.php"), 300, $themename);
Puesto que más adelante tengo la dirección de la imagen gradient.gif y me gustaría referenciarla a otro directorio.
.navbar {
background-image: url(<?PHP echo "$themeurl"?>/gradient.gif);
}
Te agradezco tu tiempo.
Ariel

1 respuesta

Respuesta
1
Esta función configura la cabecera de la página así como establece el path de la web.
1211 function style_sheet_setup($lastmodified=0, $lifetime=300, $themename="") {
1212 /// This function is called by stylesheets to set up the header
1213 /// approriately as well as the current path
1214
1215 global $CFG;
1216
1217 header("Last-Modified: " . gmdate("D, d M Y H:i:s", $lastmodified) . " GMT");
1218 header("Expires: " . gmdate("D, d M Y H:i:s", time() + $lifetime) . " GMT");
1219 header("Cache-control: max_age = $lifetime");
1220 header("Pragma: ");
1221 header("Content-type: text/css"); // Correct MIME type
1222
1223 if (!empty($themename)) {
1224 $CFG->theme = $themename;
1225 }
1226
1227 return "$CFG->wwwroot/theme/$CFG->theme";
1228
1229 }
Esta es la implementación de dicha función, si observas, te agrega en el path la carpeta "theme" por defecto (en la linea 1227) antes de la carpeta que tu le indicas a la función style_sheet_setup.
Ten en cuenta ese directorio y creo que dejarás de tener el problema.

Añade tu respuesta

Haz clic para o

Más respuestas relacionadas