Index: temp/branches/ec-cube-beta/data/lib/slib.php
===================================================================
--- temp/branches/ec-cube-beta/data/lib/slib.php	(revision 10650)
+++ temp/branches/ec-cube-beta/data/lib/slib.php	(revision 10850)
@@ -2676,4 +2676,34 @@
 }
 
+/* 
+ * ´Ø¿ôÌ¾¡§sfWriteFile
+ * °ú¿ô1 ¡§½ñ¤­¹þ¤à¥Ç¡¼¥¿
+ * °ú¿ô2 ¡§¥Õ¥¡¥¤¥ë¥Ñ¥¹
+ * °ú¿ô3 ¡§½ñ¤­¹þ¤ß¥¿¥¤¥×
+ * °ú¿ô4 ¡§¥Ñ¡¼¥ß¥Ã¥·¥ç¥ó
+ * ÀâÌÀ¡¡¡§¥Õ¥¡¥¤¥ë½ñ¤­½Ð¤·
+ */
+function sfWriteFile($str, $path, $type, $permission = "") {
+	//¥Õ¥¡¥¤¥ë¤ò³«¤¯
+	if (!($file = fopen ($path, $type))) {
+		$mess = "¥Õ¥¡¥¤¥ë¤¬³«¤±¤Þ¤»¤ó";
+	}
+
+	//¥Õ¥¡¥¤¥ë¥í¥Ã¥¯
+	flock ($file, LOCK_EX);
+	//¥Õ¥¡¥¤¥ë¤Î½ñ¤­¹þ¤ß
+	fputs ($file, $str);
+	//¥Õ¥¡¥¤¥ë¥í¥Ã¥¯¤Î²ò½ü
+	flock ($file, LOCK_UN);
+	//¥Õ¥¡¥¤¥ë¤òÊÄ¤¸¤ë
+	fclose ($file);
+	// ¸¢¸Â¤ò»ØÄê
+	if($permission != "") {
+		chmod($path, $permission);
+	}
+	
+	return $mess;
+}
+	
 function sfFlush($output = " ", $sleep = 0){
 	// ¼Â¹Ô»þ´Ö¤òÀ©¸Â¤·¤Ê¤¤
