Answer the question
In order to leave comments, you need to log in
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");
Answer the question
In order to leave comments, you need to log in
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 questionAsk a Question
731 491 924 answers to any question