Welcome Guest, Not a member yet? Register   Sign In
ERR_CONNECTION_REFUSED on the tutorial
#6

===== English =====================
wow I can't believe I'm replying to this old post... but I hope the following will help someone.

I have this piece of code in: config/config.php in $config["base_url"]

PHP Code:
$root = (isset($_SERVER["HTTPS"]) ? "https://" "http://") . $_SERVER["HTTP_HOST"];
$root .= str_replace(basename($_SERVER["SCRIPT_NAME"]), ""$_SERVER["SCRIPT_NAME"]);
$config["base_url"] = $root

Regardless of whether it is on the server or local, it dynamically takes the main path of the site. I hope that helps


===== Español =====================

wow, no puedo creer que esté respondiendo a esta publicación tan vieja... pero espero que lo siguiente ayude a alguien.

Tengo este fragmento de código en: config/config.php en $config["base_url"]

PHP Code:
$root = (isset($_SERVER["HTTPS"]) ? "https://" "http://") . $_SERVER["HTTP_HOST"];
$root .= str_replace(basename($_SERVER["SCRIPT_NAME"]), ""$_SERVER["SCRIPT_NAME"]);
$config["base_url"] = $root

Independientemente de si está en un servidor o local, toma dinámicamente la ruta principal del sitio.

Espero que eso ayude a alguien
Reply


Messages In This Thread
RE: ERR_CONNECTION_REFUSED on the tutorial - by carlospinedat - 03-09-2022, 10:07 PM



Theme © iAndrew 2016 - Forum software by © MyBB