ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

6-3-3 ±N¸ê®Æ¼g¤JÀÉ®×

6-3-3 ±N¸ê®Æ¼g¤JÀÉ®×

6-3-3   ±N¸ê®Æ¼g¤JÀÉ®×
­n±N¸ê®Æ¼g¤JÀɮ׳̲³æ¤F¡Aª½±µ¨Ï¥Îfwrite()©Îfputs()¨ç¼Æ´N¦æ¤F¡G
fwrite() »Pfputs()¨ç¼Æ®æ¦¡
  1. int fwrite ( resource handle, string string [, int length])
  2. int fputs ( resource handle, string string [, int length])
½Æ»s¥N½X
fwrite()»Pfputs()¨ç¼Æ®æ¦¡³£¤@¼Ë¡A¨Ï¥Îªº¤è¦¡·íµM¤]³£¤@¼Ë¡Aµ§ªÌ¬O¤ñ¸û³ßÅwfwrite()¨ç¦¡°Õ¡I¨Ò¦p¡G
  1. <?
  2. $myfile="writetest1.txt";
  3. $word="§Ú¬O³Q¼g¤Jªº¸ê®Æ";

  4.     $file=fopen($myfile,"w");
  5.    fwrite($file,$word);
  6. ?>
½Æ»s¥N½X
¦pªG¨S³]©w¼g¤Jªø«×°Ñ¼Æ¡A¥Nªí­n±N¥þ³¡ªº¸ê®Æ³£¼g¤J¨ìÀɮפ¤¡A­Y«ü©wªø«×°Ñ¼Æ¡A«h¼g¤Jªº¸ê®Æ´N¥u¦³§Ú­Ì©Ò«ü©wªºªø«×¸ê®Æ¡G
  1. <?
  2. $myfile="writetest1.txt";
  3. $word="§Ú¬O³Q¼g¤Jªº¸ê®Æ";

  4.     $file=fopen($myfile,"w");
  5.    fwrite($file,$word,4); //Àɮפº¥u¦³¡¨§Ú¬O¡¨
  6. ?>
½Æ»s¥N½X
¤ß¦w¡A¥­¦w   
µoªí¥ô¦óµL·N¸qªº·PÁ©ÎÄé¤ô¤å³¹¤@«ß¬å,¬Ã±¤±b¸¹,½Ð¸Ô¾\ª©³W!!

        ÀR«ä¦Û¦b : ¡i¬O§_µo´§¤F¨}¯à¡H¡j¤H¶¡¹Ø©R¦]¬°µu¼È¡A¤~§óÅã±o¬Ã¶Q¡CÃø±o¨Ó¤@½ë¤H¶¡¡AÀ³°Ý¬O§_¬°¤H¶¡µo´§¤F¦Û¤vªº¨}¯à¡A¦Ó¤£­n¤@¨ý¨Dªø¹Ø¡C
ªð¦^¦Cªí ¤W¤@¥DÃD