U E D R , A S I H C RSS

이승한/PHP

이승한 /PHP class='perma' href='#s-1'>¶




1.1class='dot'>.n> span>주 키워ass='perma' href='#s-1.1'>¶

  • 가변변class='line-anchor' id='line-7'>an>
  • include "./input.inc"; // 헤더는 보통 inc의 확장자를 가진. 기타 다른 장자 상관이 없.lass='line-anchor' id='line-8'>n>

1.2class='dot'>.n> span>SQL API ass='perma' href='#s-1.2'>¶

  • 다양한 SQL 함가 지원된다.ass='line-anchor' id='line-11'>n>
  • asp.net서 보던 ODBC 를 이용한 DB와의 신보 간단고 빠른듯.pan class='line-anchor' id='line-12'><br />

1.3class='dot'>.n> span>기 기타사항 class='perma' href='#s-1.3'>¶</a>

<div id="sc-6">

1.3.4n class='dot'>.pan> string 련함 s='perma' href='#s-1.3.4'>&#xB6;

PHP 변타입로 문열을 지원한다. // 는지 모르겟네요. 략 추class='line-anchor' id='line-64'>pan>
>
  • addslashes(); //자열 수를 리턴. 자열 특수문자가 들어을때 /를 추하여 다.an class='line-anchor' id='line-65'>
  • strcmp($val1, $val2); //같다면 1 다른다면 0n class='line-anchor' id='line-66'></span> />
  • htmlspecilchars(); //& " ' < > 등 HTML에서 용하 키워드를 른 키드로 바꿔준다. ex>&amp; -> &amp; " ->"ass='line-anchor' id='line-67'>n>
  • nl2br() // n을 &lt;br>로 바꾸어 준다.<span class='line-anchor' id='line-68'>
  • explode() // 문열을 정한 문자열을 기으로 리하 배열형태로 넘겨다. array 사용법을 모르음.n class='line-anchor' id='line-69'></span> />
  • implode() //explode와 반lass='line-anchor' id='line-70'>an>

    ~cpp 
    //explode
    $array_string = explode(" ", $string);
    //implode
    $array_string = array("Apple", "Orange", "Banana", "Grape");
    $string = implode(" or ", $array_string);
      
    <span class='line-anchor' id='line-77'>
  • substr($수, 작점, 끝점) //지정 길이 만큼 자열 돌려다. excel의 middle과 슷. substr($string, 0, 5); class='line-anchor' id='line-78'>pan>
    >
  • strlen() //C와 다.n class='line-anchor' id='line-79'></span> />
  • str_replace("찾문자", "바문자", $변수) // replacean class='line-anchor' id='line-80'>
  • ord() // 주어 문자 ascii드값<span class='line-anchor' id='line-81'>
  • chr() // 주어진 ascii 의 해 문자

1.4.1n class='dot'>.pan> 변수의 종류 사용 >

v id="sc-12">
  • 기본사용 : $수이의 형이며 변수 입은 재하 않는다. 객를 이용하여 type을 지정할수는 다.n class='line-anchor' id='line-91'></span> />
  • 배열변수 : 변수명href='/wiki.php/0' >0, 변수명1, 수명pan>ass='nonexistent' rel='nofollow' href='/wiki.php/2'>2</a>>, 변수3an>class='line-anchor' id='line-92'>pan>
    >
  • 전역변수 : global $변명;an class='line-anchor' id='line-93'>
  • 정적변수 : static $변명;an class='line-anchor' id='line-94'>
  • 가변변수 : 변수값으로 변명을 정할 수 있.lass='line-anchor' id='line-95'>an>
    ~cpp 
      $first = "good";
      $$first = "morning";
      echo("$good");
       
  • 1.4.3n class='dot'>.pan> 연산자 ='perma' href='#s-1.4.3'>&#xB6;</h3>
    id="sc-14">
  • 산술 : + - * / % 사칙산과 머지 연산이 존재다. ++ 전후위 연자도 다.an class='line-anchor' id='line-109'><br />
  • 비교논리 : === != < > <= >= and or xor ! &amp;& || 이 있으며 선순는 C와 비슷듯 하.class='line-anchor' id='line-110'>span>
    />
  • 1.4.4n class='dot'>.pan> 조건 어문 <a class='perma' href='#s-1.4.4'> 6;3>
    ="sc-15">
  • if, while, switch, for 이 존재한다. class='line-anchor' id='line-112'></span> />
  • break, continuean class='line-anchor' id='line-113'><br />
  • 1.4.5n class='dot'>.pan> 함수 class='perma' href='#s-1.4.5'>¶;>
    "sc-16">
    function 함수명(전달자){ 수내; return 변수;} // Function 도 관이 없었다. return 없어도 돼 type이 존재지 않므로 함수에 리턴입은 재하 않는다. class='line-anchor' id='line-115'></span> />



    아... 거 5년전에 던 php -_-;;;
    하나도 기억 나는 php나 다시 부해까?an class='line-anchor' id='line-121'><br /> 그런데 위키 글이 왜 안진다? - 이n class='line-anchor' id='line-122'>

    Valid XHTML 1.0! Valid CSS! powered by MoniWiki
    last modified 2021-02-07 05:30:31
    Processing time 0.0278 sec