분류 전체보기934 PHP Maximum execution time of 30 seconds exceeded 유용한 phpMyadmin 오류중 디비 덤프는 항상 골치아프다. 덩치가 큰 sql을 리스토어 할땐 자주나는 에러메세지 ------------------------------------------------ Maximum execution time of 30 seconds exceeded 이 에러는 php실행시간이 초과되서 나오는 오류입니다. 기본으로 실행후 30초가 지나면 에러가 발생하죠.. 수정하는 방법은 php.ini 에서 max_execution_time = 30 2008. 10. 19. PHP 문자수 자리 고정 1로 넘어오는 변수를 "001"로 세자리수 맞춤. $sj_src=sprintf("%03d", $vl_no); ###### To have a string with leading zeros use this: $string_i = sprintf("%04s",$value) Gives you an output with leading zeros and 4 digits. i.e. 0001 0002 ... 0010 an so on 2008. 10. 19. PHP 즐겨찾기등 바로 접속한 경우 구분하기 즐겨찾기 등 바로 접속하는 경우 REFERER 값이 없으므로 구분할 수 있다. if($HTTP_SERVER_VARS[HTTP_REFERER]=='') {return;end;} 하지만 100%로 정확한 처리가 절대 아님 ^^; 보통 제공하는 URL을 타고 들어온 경우 구분한다. 예로 http://도메인/index.php?r=direct 2008. 10. 19. PHP 소켓 통신 $host = 'ddiass.pe.kr'; $service_uri = '/test.html'; $vars ='?var=kkk'; # compose HTTP request header $header = "Host: $host\r\n"; $header .= "User-Agent: PHP Script-x\r\n"; $header .= "Content-Type: application/x-www-form-urlencoded\r\n"; $header .= "Content-Length: ".strlen($vars)."\r\n"; $header .= "Connection: close\r\n\r\n"; $fp = pfsockopen($host, 80, $errno, $errstr); if (!$fp) { echo "$e.. 2008. 10. 19. 이전 1 ··· 191 192 193 194 195 196 197 ··· 234 다음