bool isset ( mixed $var [, mixed $... ] )


isset 괄호 안의 변수가  있는지 없는지를 검사하는 함수, 만약 변수가 null 이라면 false를 리턴한다.

만약 unset()함수에 의해 unset 된다면, 더이상 set이 아니다.

만일 괄호 안에 다양한 변수가 있다면, 모든 변수가 다 들어 있어야 true 를 return한다.

'함수들' 카테고리의 다른 글

addslashes()함수  (0) 2018.01.22
strtolower()함수  (0) 2018.01.10
trim()함수  (0) 2018.01.10
getenv()함수  (0) 2018.01.10
alert()함수  (0) 2018.01.08

string addslashes ( string $str )


single quote (')

double quote (")

backslash (\)

NUL (the NUL byte)


위의  기호들을 \을 붙여서 return해주는 함수로, 대개 sql injection등을 방어할 때에 효과적으로 쓰인다.


예)

"'hello world"'   ->  \"\'hello world\'\"


<?php
$str = "Who's Peter Griffin?";
echo $str . " This is not safe in a database query.<br>";
echo addslashes($str) . " This is safe in a database query.";
?>



--->


Who's Peter Griffin? This is not safe in a database query.
Who\'s Peter Griffin? This is safe in a database query.


'함수들' 카테고리의 다른 글

isset() 함수  (0) 2018.02.01
strtolower()함수  (0) 2018.01.10
trim()함수  (0) 2018.01.10
getenv()함수  (0) 2018.01.10
alert()함수  (0) 2018.01.08

strtolower() : 괄호 안에 든 문자를 모두 소문자로 바꾸어 주는 함수

'함수들' 카테고리의 다른 글

isset() 함수  (0) 2018.02.01
addslashes()함수  (0) 2018.01.22
trim()함수  (0) 2018.01.10
getenv()함수  (0) 2018.01.10
alert()함수  (0) 2018.01.08

trim(): 현재 String 개체에 앞공백 및 뒷 공백 모두 제거

'함수들' 카테고리의 다른 글

addslashes()함수  (0) 2018.01.22
strtolower()함수  (0) 2018.01.10
getenv()함수  (0) 2018.01.10
alert()함수  (0) 2018.01.08
@file함수  (0) 2018.01.04



$getenv(REMOTE_ADDR) : 접속자 IP Address


$getenv(HTTP_USER_AGENT) : 접속자 브라우저 정보

'함수들' 카테고리의 다른 글

strtolower()함수  (0) 2018.01.10
trim()함수  (0) 2018.01.10
alert()함수  (0) 2018.01.08
@file함수  (0) 2018.01.04
fwrite함수  (0) 2018.01.04

alert(띄우고 싶은 말)


어떤 창에다 글을 적어서 띄우고 싶을때 사용가능한 함수


예)

alert("Hello! I am an alert box!!");



'함수들' 카테고리의 다른 글

trim()함수  (0) 2018.01.10
getenv()함수  (0) 2018.01.10
@file함수  (0) 2018.01.04
fwrite함수  (0) 2018.01.04
fopen함수  (0) 2018.01.04

@file() : 괄호 안에 있는 파일 전부를 읽어 오는 함수


array file ( string $filename [, int $flags = 0 [, resource $context ]] )


$fck=@file("tmp/.number");


file("읽어 올 파일")

'함수들' 카테고리의 다른 글

getenv()함수  (0) 2018.01.10
alert()함수  (0) 2018.01.08
fwrite함수  (0) 2018.01.04
fopen함수  (0) 2018.01.04
ereg, eregi함수  (0) 2018.01.02

fwrite : 파일에 쓰기를 위한 함수


int fwrite ( resource $handle , string $string [, int $length ] )


$f=fopen("tmp/tmp-$time","w");

fwrite($f,"127.0.0.1");


fwrite(써 넣을 파일 , "써 넣을 글");

'함수들' 카테고리의 다른 글

alert()함수  (0) 2018.01.08
@file함수  (0) 2018.01.04
fopen함수  (0) 2018.01.04
ereg, eregi함수  (0) 2018.01.02
MySQL limit함수  (0) 2017.09.24

+ Recent posts