웹에디터로 이미지 등록시 이미지 태그 추출하여 활용하기
$imgsize = @getimagesize(서버절대경로); if($imgsize[0] > 650){ echo ""; } else{ echo ""; } $content; //에디터 내용가져옴 //이미지태그 추출 preg_match_all("/]*src=[\"']?([^>\"']+)[\"']?[^>]*>/i", $content, $out_html); //print_r($out_html); for($i = 0; $i < count($out_html); $i++){ $content = str_replace($out_html[0][$i],"",$content); } echo $content;
PHP Tip
2011. 3. 8. 11:00
롤오버시 이미지 변경
방법 1. $(document).ready(function(){ $(".eventimg").mouseover(function (){ var file = $(this).attr('src').split('/'); var filename = file[file.length-1]; var path = ''; for(i=0 ; i < file.length-1 ; i++){ path = ( i == 0 )?path + file[i]:path + '/' + file[i]; } $(this).attr('src','/aaa/bbb/image/event_on.gif'); }).mouseout(function(){ var file = $(this).attr('src').split('/'); var filename = file..
JQuery
2011. 2. 26. 01:21