if($a = $b)
if($a = $b){ } 이것은 아래와 동일 $a = $b; if($a){ }
- PHP
- · 2010. 5. 10.
$dir_file = "$docroot/fotofiles/";// 파일이 있는 디렉토리 $dir_tar = "$docroot/fotofiles/down/";// 파일을 묶어서 저장할 디렉토리 $tarname = "down.tar.gz";// 묶은 파일명 $downfilename = "홍길동사진.tar.gz";// 다운로드받을 파일명 chdir($dir_tar); exec("tar czf $tarname ../file1 ../file2 ../file3"); sleep(1);//파일이 많거나 용량이 큰경우, gzip으로 압축할 경우 1초 정도 대기 chdir($dir_file); if(eregi("(MSIE 5.5|MSIE 6.0)", $HTTP_USER_AGENT)){ header("content-type..
@http://www.datguri.net/B_83/4087 @http://phpthumb.sourceforge.net
// build iconv function //http://monowx.blog.me/110084374548 if(!function_exists('iconv')) { function iconv($from, $to, $text) { $tmp_from = $_SERVER['DOCUMENT_ROOT'].'/temp/iconv_from'; $tmp_to = $_SERVER['DOCUMENT_ROOT'].'/temp/iconv_to'; $iconv_path = "/usr/bin/iconv"; if(file_exists($tmp_from)) { @unlink($tmp_from); } if(file_exists($tmp_to)) { @unlink($tmp_to); } $open_from = fopen($tmp_fro..
if($a = $b){ } 이것은 아래와 동일 $a = $b; if($a){ }
ASP / PHP Cross Reference http://www.design215.com/toolbox/asp.php ASP (VBScript) PHP (v4.3+) General syntax ASP Comments, inline 'my dog has fleas PHP Comments, inline //my dog has fleas ASP Comments, block not available? PHP Comments, block /* The quick brown fox jumped over the lazy dogs. */ ASP, Escaping quotes "" "var text1="""";" PHP, Escaping quotes \" or use ' like javascript 'var text1=..
clearstatcache (PHP 3, PHP 4, PHP 5) clearstatcache -- 파일의 통계(stat) 캐시를 삭제합니다. Descriptionvoid clearstatcache ( void ) 대부분의 운영체제에서stat나lstat등의 시스템호출을 사용해서 일을하는 것은 꽤 자원을 많이 소모합니다. 그렇기 때문에 최종적으로 사용된 상태를 나타내는 함수(아래에 나열된)의 결과는 다음번에 같은 파일이름을 사용하여 그런 호출을 할 경우를 위하여 저장이 됩니다. 만약에 파일이 여러번 체크가 되었고 파일이 바뀌거나 파일이 없어졌을 경우등에 상태를 강제로 다시 체크하고자 한다면 이 함수를 사용하여 저장되어있는 최종결과를 메모리에서 삭제할 수 있습니다. 이 값은 어떤 단일 요청(request)이 ..