| Direktori : /home/runcloud/webapps/wpdefault/domain/ |
| Current File : /home/runcloud/webapps/wpdefault/domain/save.php |
<?php
$json = file_get_contents('domain.json');
$data = json_decode($json,true);
if(!empty($data)){
foreach($data as $row){
$domain = str_replace(",", "', '", $row['domain']);
$dbname = $row['dbname'];
$file .= "'$dbname' => ['$domain'],";
}
}
$file = '$domain_list = ['.$file.'];';
$file = '<?php '.str_replace(',];', '];', $file).' ?>';
file_put_contents('domain.php', $file);
echo "<h2>Đã lưu file thành công!</h2>";
?>