통합 서버 관리자의 파일 경로 코드를 문자열로 변경.

This commit is contained in:
2018-03-07 21:29:48 +09:00
parent 7206826974
commit bc3a6cf86e
55 changed files with 183 additions and 204 deletions
+2 -2
View File
@@ -3,8 +3,8 @@ if(!defined('ROOT')){
define('ROOT', '..');
}
require_once(ROOT.'/f_config/config.php');
require_once(ROOT.W.F_CONFIG.W.APP.PHP);
require_once(ROOT.W.F_FUNC.W.FUNC.PHP);
require_once(ROOT.'/f_config/app.php');
require_once(ROOT.'/f_func/func.php');
CustomHeader();
-25
View File
@@ -1,25 +0,0 @@
<?php
require_once('_common.php');
require_once(ROOT.W.F_FUNC.W.'class._JSON.php');
class _Chat {
public static function SetChat($type, $name, $msg) {
$filename = ROOT.W.D_CHAT.W.$type."Chat.txt";
AppendToFile($filename, "{$name}: {$msg}\n");
}
public static function GetChat($type, $size=10) {
$filename = ROOT.W.D_CHAT.W.$type."Chat.txt";
$content = ReadToFileBackward($filename, $size*100);
$msgs = explode("\n", $content);
$count = count($msgs) - 1;
$start = $count - $size;
if($start < 0) $start = 0;
for($i = $start; $i < $count; $i++) {
$newMsg[] = htmlspecialchars($msgs[$i]);
}
return $newMsg;
}
}
+1 -1
View File
@@ -2,7 +2,7 @@
require_once('_common.php');
class _Lock {
private static $l = ROOT.W.'lock.txt';
private static $l = ROOT.'/lock.txt';
public static function Busy() {
$fp = fopen(_Lock::$l, 'r');
+3 -3
View File
@@ -1,17 +1,17 @@
<?php
require_once('_common.php');
require_once(ROOT.W.F_FUNC.W.'class._JSON.php');
require_once(ROOT.'/f_func/class._JSON.php');
class _Log {
private static $flagLog = true;
public static function SetLog($type, $log) {
$filename = ROOT.W.D_LOG.W.$type."Log.txt";
$filename = ROOT.'/d_log/'.$type."Log.txt";
if(_Log::$flagLog) AppendToFile($filename, $log."\n");
}
public static function GetWorldLog($type, $size=10) {
$filename = ROOT.W.D_LOG.W.$type."Log.txt";
$filename = ROOT.'/d_log/'.$type."Log.txt";
if(_Log::$flagLog) {
$content = ReadToFileBackward($filename, $size*150);
$logs = explode("\n", $content);
+1 -1
View File
@@ -1,6 +1,6 @@
<?php
require_once('_common.php');
require_once(ROOT.W.F_FUNC.W.'class._Lock.php');
require_once(ROOT.'/f_func/class._Lock.php');
class _Process {
private static $mutexLog = false;
+1 -1
View File
@@ -1,6 +1,6 @@
<?php
require(__dir__.'/../vendor/autoload.php');
require_once(ROOT.W.F_FUNC.W.'class._String.php');
require_once(ROOT.'/f_func/class._String.php');
use utilphp\util as util;
+7
View File
@@ -1,6 +1,13 @@
<?php
require(__dir__.'/../vendor/autoload.php');
function SetHeaderNoCache(){
if(!headers_sent()) {
header('Cache-Control: no-cache, no-store, must-revalidate'); // HTTP 1.1.
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
}
}
function CustomHeader() {
//FIXME: 왜 Contect-Type이 text/html로 고정이지?!
if(!headers_sent()) {