분류 전체보기934 PHP 문자열 함수 string substr(string 문자열, int 시작 [, int 끝]) -> 문자열의 일부를 반환 $string = substr("The cat sat on the mat", 4, 3); // 결과 : 'cat' int strpos(string 대상 문자열, string 찾을 문자열 [, int 오프셋]) -> 찾는 문자열의 위치 $string = strpost("The cat sat on the mat", "cat"); // 결과 : '4' chr()은 아스키 코드를 받아서 해당 문자를 출력 ord()은 반대기능 -> echo(char(64)); //결과 '@' -> echo(ord('@')); //결과 '64' * 참고. & -> & amp; " -> & quot; & lt; > ->.. 2008. 10. 18. img를 php 페이지로 부르기 $file="../../upLoad/expose/".$row[filename]; $img=@getimagesize($file); $img_type=$img[mime]; Header("Content-Type: $img_type"); $fp=fopen($file,"r"); //스트리밍 JPG,GIF일 경우 $count = fread($fp, filesize($file)); echo $count; 2008. 10. 18. PHP 설치 후 POST 값이 전송되지 않을경우 php.ini 파일에서 보안 문제로 잠겨있는 register_globals = On 이거 on으로 해주세요~~ DOCUMENT_ROOT값 프린팅 안될때두~~~ 2008. 10. 18. PHP FTP 원격으로 파일 삭제 $ftp_server_1="test.net"; $ftp_user_name="test"; $ftp_user_pass="testpwd"; $file = "/home/public_html/test/".$pre_file; // set up basic connection $conn_id_1 = ftp_connect($ftp_server_1); // login with username and password $login_result_1 = ftp_login($conn_id_1, $ftp_user_name, $ftp_user_pass); // try to delete $file @ftp_delete($conn_id_1, $file); // close the connection ftp_quit($conn_id_1); 2008. 10. 18. 이전 1 ··· 200 201 202 203 204 205 206 ··· 234 다음