This repository was archived by the owner on May 4, 2023. It is now read-only.
Description site/config/config.DIST.php:
<?php
...
'db' => array(
'connectionString' => 'mysql:dbname={ EDIT ME };host={ EDIT ME };charset=utf8',
+ // With PORT: 'connectionString' => 'mysql:dbname={ EDIT ME };host={ EDIT ME };port={ EDIT ME };charset=utf8',
- )
+ ),
+ 'webroot' => '', //{ EDIT ME }
framework/base/CWebApplication.php:
<?php
...
public function __construct() {
$this->config = require('site' . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'config.php');
- $this->documentRoot = $_SERVER['DOCUMENT_ROOT'];
+ $this->documentRoot = __DIR__ . '/../..'; //Was: $_SERVER['DOCUMENT_ROOT'];
+ $this->webRoot = $this->config['webroot'];
site/templates/default.php:
<?php
...
- <link href="/css/bootstrap.min.css" rel="stylesheet" media="screen">
- <link href="/css/styles.css" rel="stylesheet" media="screen">
+ <link href="<?php echo $webroot ?>/css/bootstrap.min.css" rel="stylesheet" media="screen">
+ <link href="<?php echo $webroot ?>/css/styles.css" rel="stylesheet" media="screen">
... Reactions are currently unavailable
site/config/config.DIST.php:<?php ... 'db' => array( 'connectionString' => 'mysql:dbname={ EDIT ME };host={ EDIT ME };charset=utf8', + // With PORT: 'connectionString' => 'mysql:dbname={ EDIT ME };host={ EDIT ME };port={ EDIT ME };charset=utf8', - ) + ), + 'webroot' => '', //{ EDIT ME }framework/base/CWebApplication.php:<?php ... public function __construct() { $this->config = require('site' . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'config.php'); - $this->documentRoot = $_SERVER['DOCUMENT_ROOT']; + $this->documentRoot = __DIR__ . '/../..'; //Was: $_SERVER['DOCUMENT_ROOT']; + $this->webRoot = $this->config['webroot'];site/templates/default.php: