일단 include require 할 파일 하나..
/api/BlurTool/common.php- 공통 글로별 변수
$workerID = addslashes($_POST["workerid"]) ? addslashes($_POST["workerid"]) : addslashes($_GET["workerid"]); $password = addslashes($_POST["password"]) ? addslashes($_POST["password"]) : addslashes($_GET["password"]); $pvrID = addslashes($_POST["pvrid"]) ? addslashes($_POST["pvrid"]) : addslashes($_GET["pvrid"]);
catchDBError함수
function catchDBError($mysqli, $message) { if($mysqli->connect_errno){ echo($message); $mysqli->close(); exit(); } }
dbTest함수
function dbTest(){ // MySql Connection UTF-8 and Test global $ConnectServer, $ConnectId, $ConnectPassword, $ConnectDatabaseWork; $mysqli = new mysqli($ConnectServer, $ConnectId, $ConnectPassword, $ConnectDatabaseWork); catchError($mysqli); $mysqli->close(); }
이제 얘내를 어떻게 쓸거냐
Get the current script file name
If I have PHP script, how can I get the filename from inside that script? Also, given the name of a script of the form jquery.js.php, how can I extract just the "jquery.js" part?
https://stackoverflow.com/questions/4221333/get-the-current-script-file-name
echo( __FILE__." File ".__LINE__ ."th Line Error");
일단 이러면

요런데 상대경로로 하고싶다
Getting relative path from absolute path in PHP
I noticed some similar questions about this problem when I typed the title, but they seem not be in PHP. So what's the solution to it with a PHP function? To be specified. $a="/home/apache/a/a.ph...
https://stackoverflow.com/questions/2637945/getting-relative-path-from-absolute-path-in-php
- 얘는 작동 안하면서 함수 하나 더쓰기 귀찬..
realpath()함수는 그냥 _file_같은데 relpath()없나[PHP] 열린 문서의 절대경로, 상대 경로, URL, URI 나타내기
https://pat.im/817
여윽시 정리해둔게 있다 ㅎㅎ
include 하면 파일 상대경로 달라져서 그냥 하기로
echo( __FILE__." ".__LINE__ ."th Line Error\n");
간단한 것이 최고다

Seonglae Cho