PHP essential plugin 입니다
/config/user_conf.php를 열어 db => 에 있는 array를 수정해주세요
host => db의 host [localhost]
user => 유저명
pass => 비밀번호
database => db 이름
그리고 index.php로 접속해보면 hello module! 이라는 메세지가 뜬다면 성공입니다!
executequery($query) : sql쿼리를 실행합니다.
리턴 형식 : stdClass
stdclass(
sql => 쿼리 문,
status => 성공 상태(200, 404),
sum => select시 선택된 개수
data => array(
[0] => db에 있는 값
.. sum 만큼의 배열이 있음
),
)
sql_secure($val) : get이나 post로 들어온 값의 sql 인젝션을 막습니다
리턴 형식 : String
include_module($module) : /module/$module/$module.class.php 파일을 불러옵니다
리턴 없음
__get($var) : $_GET['var']와 같습니다.
__post($var) : $_POST['var']와 같습니다.
__require($var) : $_REQUIRE['var']와 같습니다.
isSecure() : https 연결인지 http 연결인지 확입합니다
리턴 값 : Boolean