월별 글 목록: 2024년 4월월
치약 메모
AJAX를 사용하여 파일 업로드 하기
<?php
include_once(‘./_common.php’);
include G5_PATH.’/header.php’;
?>
<!DOCTYPE html>
<html lang=”en”>
<head>
<meta charset=”UTF-8″>
<title>AJAX를 사용하여 파일 업로드 하기</title>
</head>
<body>
<script src=”https://code.jquery.com/jquery-latest.js”></script>
<script>
function file_frm_submit(frm) {
var fileCheck = frm.upload_file.value;
if(!fileCheck) {
alert(“업로드할 파일을 선택하세요.”);
return false;
}
var formData = new FormData(frm); // 파일전송을 위한 폼데이터 객체 생성
formData.append(“message”, “ajax로 파일 전송하기”);
formData.append(“file”, jQuery(“#upload_file”)[0].files[0]);
$.ajax({
url: ‘./ajax_file_upload.php’,
type : ‘POST’,
dataType : ‘html’,
enctype : ‘multipart/form-data’,
processData : false,
contentType : false,
data : formData,
async : false,
cache : false,
timeout : 600000,
success: function(data){
var text_reserlt = data;
if( text_reserlt == “MYPAGE” )
{
console.log(‘mypage’);
location.href = ‘/rudtjdtlr/mypage/’;
}
else if( text_reserlt == “I” )
{
location.href = ‘/user/auto_login/index.php?id=’+email;
}
else {
console.log(text_reserlt);
}
}
});
}
</script>
<form id=”file_frm” enctype=”multipart/form-data”>
<input type=”text” name=”what” value=”a”>
<br><br>
<input type=”file” name=”upload_file” id=”upload_file”>
<br><br>
<input type=”file” name=”upload_file2″ id=”upload_file2″>
<br><br>
<input type=”file” name=”upload_file3″ id=”upload_file3″>
<br><br>
<button type=”button” name=”upload_btn” onClick=”file_frm_submit(this.form);”>ajax 업로드</button>
</form>
</body>
</html>
메타 태그 개발
<meta name=”description” content=”검색 키워드” />
<meta http-equiv=”Content-Script-Type” content=”text/javascript” >
<meta http-equiv=”Content-Style-Type” content=”text/css” >
<meta http-equiv=”X-UA-Compatible” content=”IE=edge” >
<meta name=”google-site-verification” content=”9eaZCzeL94TMigd6S3oePfvFIiit6d5Gf9jEEloIfNg” />
<meta name=”naver-site-verification” content=”3c21035132ef540abb08a1bd64811200fb215f9c”/>
<meta property=”og:url” content=”https://mall.godpeople.com/?GO=gstore_cjh” />
<meta property=”og:type” content=”website” />
<meta property=”og:title” content=”곰취아빠 청정향 [갓피플몰]”/>
<meta property=”og:image”
content=”https://spimage.godpeople.com/goImage/2023/1690359764239.jpg”/>
<meta property=”og:description” content=”곰취향냉면(물냉면, 비빔냉면)rn곰취가래떡! 곰취생칼국수면!”/>
안녕하세요!
홈페이지 리뉴얼 작업 시작했습니다.
기존 기술 자료를 찾으셨던 분들은 해당 내용만 참조 하시고, 기존 홈페이지 자료 보고 싶으신 분들은
http://gkswngus.mykhs7200.gethompy.com/ 을 통해 보시면 됩니다.