A
A
Azamat Baimurzin2016-02-05 13:59:27
PHP
Azamat Baimurzin, 2016-02-05 13:59:27

How to set up locale?

I copied the self-written site to the LAN, configured everything. But there is an error connecting to the database, he tries to connect to the hosting database. As I understand it creates a cached page

<?php
define('INDEXCACHEPATH', dirname(__FILE__) . '/cache/index.html');
define('INDEXCACHEPATH_TS', INDEXCACHEPATH_TS . '.ts');

// Hardcache index page for 10 minutes
$ts = @file_get_contents(INDEXCACHEPATH_TS);
if($_SERVER['REQUEST_URI'] == '/' && $ts > time() - 10) {
  readfile(INDEXCACHEPATH);
  print '<!-- from hardcache -->';
  exit(0);
}
ob_start();

require_once("inc/cms.php");

But the page is not created
, what could be the problem, I use openserver

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Timofeev, 2016-02-05
@mrBaimurza

1. Find the connection to the database in the code and write localhost in the address
2. Clear the cache.
3. What's wrong? Can I have the text of the error?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question