Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Linux±à³Ì--fopenº¯ÊýµÄÓ÷¨£¿

ÇëÎʸ÷λ¸ßÊÖ£ºC±à³ÌÖеÄfopenº¯Êý,Ô­ÐÍÊÇ fopen(const char *filename,const char mode),ÇëÎÊÔÚʹÓÃÕâ¸öº¯Êýʱ£¬ÒªÏë´ÓLinuxÖÕ¶ËÊäÈëÎļþÃûºÍmode£¬¸ÃÈçºÎ´¦Àí£¿Ð»Ð»£¡£¡

                ÊéÉϽâÊÍfilenameʱ˵£¬filename¿ÉÒÔËùÎļþÃû£¬Ò²¿ÉÒÔÊÇ°üÀ¨Îļþ·¾¶µÄÎļþÃû£¬ÖÕ¶ËÊäÈëÎÒÓÃÁËgetsº¯Êý£¬µ«ÊÇÔÚÖ´Ðе½fopenº¯Êýʱ£¬³öÏֶδíÎó£¬ÎÒÏëʵÏÖµÄÊÇ£¬´ÓÖÕ¶ËÊäÈëÎļþÃû´æ´¢ÔÚstrÖУ¬È»ºófopen(str,mode),ÇëÎÊÎÒ¸ÃÈçºÎ²Ù×÷ÄØ£¿
modeÆäʵÊÇÒ»¸öconst char£¬ËùÒÔÐèÒªÒ»¸öchar*À´±£´æ£¬filenameÒ²Ò»Ñù°¡¡£
²»¹ýÐèÒª¼ì²éÕâÁ½¸öÊäÈëstringµÄºÏ·¨ÐÔ£¬²»È»»á³ö´í¡£
¹©²Î¿¼£º
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main(int argc, char *argv[])
{
  char filename[20],mode[5];
  FILE * fHandle = NULL;
  memset(filename,'\0',20);
  printf("input filename:");
  scanf("%s",filename);
  printf("\ninput mode string:");
  while(1)
  {
  memset(mode,'\0',5);
  scanf("%s",mode);
  /*For example:only need "w" mode for fopen */
  if(strcmp(mode,"w"))
  {
                      printf("invalid mode,please input again:\n");
                &nb


Ïà¹ØÎÊ´ð£º

Ë­Äܸø¸öLinuxÏÂдC/C++³ÌÐòµÄ½Ì³Ì£¿

¸ø¸öµØÖ·£¬»òÕß·¢µ½ÎÒÓÊÏäÒ²ÐÐ wrongagain98@163.com
×îºÃÊÇÊÓƵµÄ£¬²»ÊÇÊÓƵÆÕͨµÄÒ²ÐС£

Ö÷ÒªÊÇÁ½·½Ã棺
1.ÔõÑù±à¼­¡¢±àÒëºÍµ÷ÊÔ³ÌÐò¡£Ï£ÍûÄÜÒ»²½²½½²Çå³þ£¬ÈçºÎ°²×°¡¢ÈçºÎÅäÖõȡ£²»Òª¾Íֻ˵¾ä¡°¾ÍÓ ......

ǶÈëʽLinuxËõ¼õÎÊÌâ

´ó¼ÒºÃ£¬±¾ÈËÄ¿Ç°¸Õ¸Õ½Ó´¥Linux¡£ÏÖÔÚ¹«Ë¾µÄÏîÄ¿ÐèÒªËõ¼õLinuxµÄKernelºÍAPP²¿·ÖµÄCode Size¡£Ä¿Ç°ÎÒÃÇʹÓõÄÊÇLinux2.6.22.15°æ±¾£¬Ó¦ÓÃÓÚADSL Modem£¨¼ÒÍ¥Íø¹Ø£©¡£

1.ÎÒÃDzúÆ·Ó¦ÓÃÊÇADSL Gateway£¬Kernel²¿ ......

LinuxϵͳÏÂÄÜ·ñʵÏÖÒÔÏÂÕâ¸ö¹¦ÄÜ

ÏÖÔÚµÄ×ö·¨ÊÇ,ͨ¹ýcrontabÿ·ÖÖÓÖ´ÐÐÒ»¸öphp,Õâ¸öphp¸ºÔð´ÓÊý¾Ý¿âÖÐÈ¡³öÓʼþ,È»ºó·¢ËÍ

ÎÊÌâÊÇ,Èç¹ûÓʼþºÜ¶à,ÿ·ÖÖÓÖ´Ðв»Íê,ÄÇ»áÔì³ÉºÜ¶àphp½ø³Ì

Äܲ»ÄÜʵÏÖµÈÕâ¸öphpÖ´ÐÐÍêÁËÁ¢¼´Æô¶¯Ò»¸öеÄ?²»ÓÃcr ......

linux redhatÔõôÖØ×°·þÎñ

ÎÒÔÚ°²×°redhat9µÄʱºòÓÐЩ·þÎñûѡ£¬±ÈÈçsamba£¬http£¬ntfs£¬telnetÏÖÔÚ²»ÏëÖØװϵͳÁË£¬ÇëÎʸÃÔõô×ö£¿
ÎÒÔÚÌí¼Ó/ɾ³ýÓ¦ÓóÌÐòÖÐ×°ÁËsamba£¬µ«ÊÇÖØÆôÖ®ºó£¬ÔÚ¡°ÏµÍ³ÉèÖÃ-·þÎñÆ÷ÉèÖá±ÖÐÔõô»¹Ã»³öÏÖsamba·þÎñÆ÷ ......

linux Ï mysql Êý¾Ý¿âɾ³ýÃüÁî

mysqladmin -u root  drop Êý¾Ý¿âÃû
ÕâÑùɾ³ý»áÒªÇó°´y È·¶¨
ÓÐûÓвÎÊý¼ÓÔÚºóÃæ ÈÃÎÒ²»Óð´yÈ·ÈÏÒ²¿ÉÒÔɾ³ý
mysql -u root -e "drop databse Êý¾Ý¿âÃû"

SQL code:
mysql> drop datab ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ