| 订阅 | 在线投稿
分享
 
 
当前位置: 王朝网络 >> php >> guan yu PHP cao zuo wen jian de yi xie FAQ zong jie

guan yu PHP cao zuo wen jian de yi xie FAQ zong jie

2008-12-22 08:08:05 编辑來源:互联网 评论
 
 
 
本文为【关于PHP操作文件的一些FAQ总结】的拼音翻译版
  PHP zhong dui ge lei shu ju ku de cao zuo you zhe zhi chi , dui wen jian de cao zuo ye tong yang you zhe hen feng fu de cao zuo fang fa , hen duo peng you xian zai de cao zuo huan shi ji yu wen jian cao zuo ke shi you de shi hou zai cao zuo wen jian de shi hou huan cun zai bu shao de kun huo he yi dian , yi xia shi wo zai ri chang bian xie guo cheng zhong peng dao de yi ji tan shang peng you suo peng dao de guan yu wen jian cao zuo de yi xie wen ti shou cang ba 。
  wen : ru he xin jian yi ge wen jian ?
  da :1、 shi yong fopen(" yao jian li de wen jian ming "," shen shu "), shen shu ke xuan w,w+,a,a+
  2、 shi yong exec("echo '' > yao jian li de wen jian ming "); zhe yang shi shi yong xi tong fang shi jian li zhe ge wen jian , ni huan ke yi shi yong touch zhe ge linux ming ling lai jian li
  wen : wei shen me wo wu fa jian li wen jian ?
  da :1、 ru guo ni shi yong le fopen jian li wen jian , shi fou zheng que de shi yong le shen shu
  2、 xi tong quan xian wen ti , qing xun wen ni de WEBMASTER ni de FTP mu lu shi fou you xie de quan xian
  3、FTP quan xian wen ti , ni yao que ren ni de PHP wen jian suo yao xie wen jian suo zai mu lu yao you xie de quan xian , ye jiu shi ni de FTP ruan jian deng lu hou other zu yao you xie zhe ge quan xian ,
  ru guo mei you qing xiu gai quan xian hou chang shi
  wen : ru he jiang wen jian du ru shu zu ?
  da : shi yong file
  wen : ru he jiang wen jian quan bu du chu ?
  da :1、 shi yong fread($fp);
  2、 ru guo ni de PHP ban ben >=4.3.0 de hua ke yi shi yong file_get_contents();
  wen : ru he pan duan wen jian shi fou cun zai ?
  da : shi yong file_exists(); wei shen me bu shi yong fopen() lai pan duan ne ? yuan yin shi you shi hou shi yin wei quan xian wen ti dao zhi fopen fan hui de shu ju yin dao wo men cuo wu de pan duan
  wen : wei shen me dang wo du qu yi ge WEB ye mian de shi hou chu cuo ?
  da :1、 ke neng shi ni de chuan di shen shu cuo , dang du qu WEB ye mian de shi hou ni zhi ke yi shi yong r fang shi du qu ye mian
  2、 que bao ni yao du qu de WEB ye mian ke yi fang wen
  wen : wo ru he cai neng huo de wen jian de xiang guan shu xing ?
  da :PHP ti gong le yi zu huo de wen jian shu xing de fang fa , li ru filemtime(),fileowner(),filegroup(),filectime(),fileatime()... xiang xi de shi yong
  qing shen yue shou ce 。
  wen :PHP da kai wen jian hou shi fou ke yi xiang C yi yang jin xing wen jian “ you biao ” de ding wei ne ?
  da : ke yi de , shi yong fseek();
  wen : wo xiang zai fang wen wen jian de shi hou bu yuan xu qi ta ren ye fang wen ci wen jian , zen me ban ?
  da :1、 ni ke yi cai yong qi ta fang mian cheng xu xian zhi yong hu jie ru wen jian cao zuo de ye mian
  2、 shi yong flock(); xiang xi de shen shu yi ji shi yong fang fa qing shen yue shou ce
  wen : ru he shan chu wen jian nei di yi xing , huo zhi ding yi xing shu ju ?
  da :PHP bing mei you ti gong zhe yang de cao zuo fang fa , bu guo wo men ke yi tong guo zu he shi yong , yi xia dai ma yan shi wo men jiang shan chu wen jian "test.dat" zhong de di san xing shu ju (test.datw
  wen jian zhong shu ju bu zhi san xing )
  <?php
  $filename="test.dat";// ding yi cao zuo wen jian
  $delline=3; // yao shan chu de xing shu
  if(!file_exsits($filename)){
  die(" zhi ding wen jian wei fa xian ! cao zuo zhong duan !");
  }
  $farray=file($filename);// du qu wen jian shu ju dao shu zu zhong
  for($tmpa=0;$Tmpa<count($farray);$Tmpa++){
  if(strcmp($Tmpa+1,$delline)==0){
  // pan duan shan chu de xing
  continue;
  }
  // chong xin zheng li hou de shu ju
  $newfp.=$farray[$Tmpa]."\r\n";
  }
fp=@fopen($filename,]$fp=@fopen($filename,"a") or die(" xie fang shi da kai wen jian $filename shi bai ");// wo men yi xie de fang shi da kai wen jian
  @fputs($fp,$newfp) or die(" wen jian xie ru shi bai ");
  @fclose($fp);
  ?>
  yi shang dai ma yan shi de shi shan chu yi xing wen jian , bu guo ni ru guo zai xi de kan de hua , qi shi ye gei ni ti gong le qi ta de wen jian cao zuo de xiang guan ti xing ~
  wen : dang wo shi tu da kai yi ge bu cun zai de wen jian de shi hou , wo ru he bu rang cuo wu xian shi chu lai yi bi mian wo de lu jing xie lu !!
  da : zai ni yao da kai wen jian de fang fa qian zeng jia @ fu hao yong lai ping bi cuo wu ,@ shi PHP ti gong de cuo wu xin xi ping bi de zhuan yong fu hao huo nin ke yi zai zhe ge yao cao zuo de bu zhou qian zeng jia ( tong chang shi zai ye shou )error_reporting(0); yong lai ping bi ye mian nei suo you cuo wu xin xi de xian shi yi ge bu tui jian de fang fa jiu shi qu xiu gai php.ini(ISP chu wai )
  wen : wo shi yong de shi xu ni zhu ji , wo ru he fang zhi qi ta yong hu qie qu wo de shu ju ?
  da : jian yi ISP xiu gai php.ini zhong de open_basedir jin xing xian zhi , bu tui jian de ISP she zhi shi jiang fopen,file deng wen jian cao zuo jia ru disable_function zhong 。
  wen : wei shen me wo yong PHP jian li wen jian hou wo FTP deng lu yao shan chu zhe xie wen jian wu fa shan chu ??
  da : zhu yao shi yin wei PHP jian li de wen jian gui shu WEB yong hu zu , ye jiu shi jian li de wen jian , bing fei shi ni FTP yong hu de !!! zhe ge wen ti de jie jue jiu shi , shi yong PHP cheng xu de chmod,unlink deng fang shi jin xing chu li , jian yi yong hu zai shi yong PHP jian li wen jian de shi hou ji de chmod wen jian quan xian , jian yi wei 777
  wen : ru he shi yong wen ben wen jian zuo wei shu ju cang ku ? you de liu yan ben , lun tan zhi lei de dou shi shi yong zhe ge de a !
  da : qi shi zhe ge zhu yao huan shi shi yong le file, jie he explode jin xing shu ju du qu yu fen ge de dian xing fan li er yi 。
  wen : ru he geng gai wen jian ming ?
  da :rename();
  wen : ru he shan chu wen jian ?
  da :unlink(); exec("del(rm -vf) filename"); zhu :rm -vf wei linux xia shi yong
  wen : ru he qing kong wen jian ?
  da : shi yong fopen(filename,"w"); huo exec("echo '' > filename");
  wen : ru he bian ji wen jian nei rong ?
  da : wo ji de wo yi qian hui da guo yi ge shan chu wen jian nei rong de , qi shi bian ji nei rong zai shan chu nei rong de ji chu shang , jin xing bian liang ti huan jiu ke yi le 。 xi wang ni ke yi xiang shang zhao zhao , jiang wo shang mian de continue xiu gai wei ti huan bian liang shu ju jiu ke yi le【原文】【汉音对照
 
 
 
 
 
 
 
 
 
日版宠物情人插曲《Winding Road》歌词

日版宠物情人2017的插曲,很带节奏感,日语的,女生唱的。 最后听见是在第8集的时候女主手割伤了,然后男主用嘴帮她吸了一下,插曲就出来了。 歌手:Def...

兄弟共妻,我成了他们夜里的美食

老钟家的两个儿子很特别,就是跟其他的人不太一样,魔一般的执着。兄弟俩都到了要结婚的年龄了,不管自家老爹怎么磨破嘴皮子,兄弟俩说不娶就不娶,老父母为兄弟两操碎了心...

如何磨出破洞牛仔裤?牛仔裤怎么剪破洞?

把牛仔裤磨出有线的破洞 1、具体工具就是磨脚石,下面垫一个硬物,然后用磨脚石一直磨一直磨,到把那块磨薄了,用手撕开就好了。出来的洞啊很自然的。需要猫须的话调几...

我就是扫描下图得到了敬业福和爱国福

先来看下敬业福和爱国福 今年春节,支付宝再次推出了“五福红包”活动,表示要“把欠大家的敬业福都还给大家”。 今天该活动正式启动,和去年一样,需要收集“五福”...

冰箱异味产生的原因和臭味去除的方法

有时候我们打开冰箱就会闻到一股异味,冰箱里的这种异味是因为一些物质发出的气味的混合体,闻起来让人恶心。 产生这些异味的主要原因有以下几点。 1、很多人有这种习...

 
 
PHP zhong dui ge lei shu ju ku de cao zuo you zhe zhi chi , dui wen jian de cao zuo ye tong yang you zhe hen feng fu de cao zuo fang fa , hen duo peng you xian zai de cao zuo huan shi ji yu wen jian cao zuo ke shi you de shi hou zai cao zuo wen jian de shi hou huan cun zai bu shao de kun huo he yi dian , yi xia shi wo zai ri chang bian xie guo cheng zhong peng dao de yi ji tan shang peng you suo peng dao de guan yu wen jian cao zuo de yi xie wen ti shou cang ba 。 wen : ru he xin jian yi ge wen jian ? da :1、 shi yong fopen(" yao jian li de wen jian ming "," shen shu "), shen shu ke xuan w,w+,a,a+ 2、 shi yong exec("echo '' > yao jian li de wen jian ming "); zhe yang shi shi yong xi tong fang shi jian li zhe ge wen jian , ni huan ke yi shi yong touch zhe ge linux ming ling lai jian li wen : wei shen me wo wu fa jian li wen jian ? da :1、 ru guo ni shi yong le fopen jian li wen jian , shi fou zheng que de shi yong le shen shu 2、 xi tong quan xian wen ti , qing xun wen ni de WEBMASTER ni de FTP mu lu shi fou you xie de quan xian 3、FTP quan xian wen ti , ni yao que ren ni de PHP wen jian suo yao xie wen jian suo zai mu lu yao you xie de quan xian , ye jiu shi ni de FTP ruan jian deng lu hou other zu yao you xie zhe ge quan xian , ru guo mei you qing xiu gai quan xian hou chang shi wen : ru he jiang wen jian du ru shu zu ? da : shi yong file wen : ru he jiang wen jian quan bu du chu ? da :1、 shi yong fread($fp); 2、 ru guo ni de PHP ban ben >=4.3.0 de hua ke yi shi yong file_get_contents(); wen : ru he pan duan wen jian shi fou cun zai ? da : shi yong file_exists(); wei shen me bu shi yong fopen() lai pan duan ne ? yuan yin shi you shi hou shi yin wei quan xian wen ti dao zhi fopen fan hui de shu ju yin dao wo men cuo wu de pan duan wen : wei shen me dang wo du qu yi ge WEB ye mian de shi hou chu cuo ? da :1、 ke neng shi ni de chuan di shen shu cuo , dang du qu WEB ye mian de shi hou ni zhi ke yi shi yong r fang shi du qu ye mian 2、 que bao ni yao du qu de WEB ye mian ke yi fang wen wen : wo ru he cai neng huo de wen jian de xiang guan shu xing ? da :PHP ti gong le yi zu huo de wen jian shu xing de fang fa , li ru filemtime(),fileowner(),filegroup(),filectime(),fileatime()... xiang xi de shi yong qing shen yue shou ce 。 wen :PHP da kai wen jian hou shi fou ke yi xiang C yi yang jin xing wen jian “ you biao ” de ding wei ne ? da : ke yi de , shi yong fseek(); wen : wo xiang zai fang wen wen jian de shi hou bu yuan xu qi ta ren ye fang wen ci wen jian , zen me ban ? da :1、 ni ke yi cai yong qi ta fang mian cheng xu xian zhi yong hu jie ru wen jian cao zuo de ye mian 2、 shi yong flock(); xiang xi de shen shu yi ji shi yong fang fa qing shen yue shou ce wen : ru he shan chu wen jian nei di yi xing , huo zhi ding yi xing shu ju ? da :PHP bing mei you ti gong zhe yang de cao zuo fang fa , bu guo wo men ke yi tong guo zu he shi yong , yi xia dai ma yan shi wo men jiang shan chu wen jian "test.dat" zhong de di san xing shu ju (test.datw wen jian zhong shu ju bu zhi san xing ) <?php $filename="test.dat";// ding yi cao zuo wen jian $delline=3; // yao shan chu de xing shu if(!file_exsits($filename)){ die(" zhi ding wen jian wei fa xian ! cao zuo zhong duan !"); } $farray=file($filename);// du qu wen jian shu ju dao shu zu zhong for($tmpa=0;$Tmpa<count($farray);$Tmpa++){ if(strcmp($Tmpa+1,$delline)==0){ // pan duan shan chu de xing continue; } // chong xin zheng li hou de shu ju $newfp.=$farray[$Tmpa]."\r\n"; } [url=mailto:$fp=@fopen($filename,]$fp=@fopen($filename,"a[/url]") or die(" xie fang shi da kai wen jian $filename shi bai ");// wo men yi xie de fang shi da kai wen jian @fputs($fp,$newfp) or die(" wen jian xie ru shi bai "); @fclose($fp); ?> yi shang dai ma yan shi de shi shan chu yi xing wen jian , bu guo ni ru guo zai xi de kan de hua , qi shi ye gei ni ti gong le qi ta de wen jian cao zuo de xiang guan ti xing ~ wen : dang wo shi tu da kai yi ge bu cun zai de wen jian de shi hou , wo ru he bu rang cuo wu xian shi chu lai yi bi mian wo de lu jing xie lu !! da : zai ni yao da kai wen jian de fang fa qian zeng jia @ fu hao yong lai ping bi cuo wu ,@ shi PHP ti gong de cuo wu xin xi ping bi de zhuan yong fu hao huo nin ke yi zai zhe ge yao cao zuo de bu zhou qian zeng jia ( tong chang shi zai ye shou )error_reporting(0); yong lai ping bi ye mian nei suo you cuo wu xin xi de xian shi yi ge bu tui jian de fang fa jiu shi qu xiu gai php.ini(ISP chu wai ) wen : wo shi yong de shi xu ni zhu ji , wo ru he fang zhi qi ta yong hu qie qu wo de shu ju ? da : jian yi ISP xiu gai php.ini zhong de open_basedir jin xing xian zhi , bu tui jian de ISP she zhi shi jiang fopen,file deng wen jian cao zuo jia ru disable_function zhong 。 wen : wei shen me wo yong PHP jian li wen jian hou wo FTP deng lu yao shan chu zhe xie wen jian wu fa shan chu ?? da : zhu yao shi yin wei PHP jian li de wen jian gui shu WEB yong hu zu , ye jiu shi jian li de wen jian , bing fei shi ni FTP yong hu de !!! zhe ge wen ti de jie jue jiu shi , shi yong PHP cheng xu de chmod,unlink deng fang shi jin xing chu li , jian yi yong hu zai shi yong PHP jian li wen jian de shi hou ji de chmod wen jian quan xian , jian yi wei 777 wen : ru he shi yong wen ben wen jian zuo wei shu ju cang ku ? you de liu yan ben , lun tan zhi lei de dou shi shi yong zhe ge de a ! da : qi shi zhe ge zhu yao huan shi shi yong le file, jie he explode jin xing shu ju du qu yu fen ge de dian xing fan li er yi 。 wen : ru he geng gai wen jian ming ? da :rename(); wen : ru he shan chu wen jian ? da :unlink(); exec("del(rm -vf) filename"); zhu :rm -vf wei linux xia shi yong wen : ru he qing kong wen jian ? da : shi yong fopen(filename,"w"); huo exec("echo '' > filename"); wen : ru he bian ji wen jian nei rong ? da : wo ji de wo yi qian hui da guo yi ge shan chu wen jian nei rong de , qi shi bian ji nei rong zai shan chu nei rong de ji chu shang , jin xing bian liang ti huan jiu ke yi le 。 xi wang ni ke yi xiang shang zhao zhao , jiang wo shang mian de continue xiu gai wei ti huan bian liang shu ju jiu ke yi le
󰈣󰈤
  免责声明:本文仅代表作者个人观点,与王朝网络无关。王朝网络登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述,其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
 
华丽的模特拍摄(8)
华丽的模特拍摄(7)
华丽的模特拍摄(6)
华丽的模特拍摄(5)
八里沟
朝阳宫
天下峨眉 云上金顶
老家(四)
 
>>返回首页<<
 
 
 为你推荐
 
 
 
 转载本文
 UBB代码 HTML代码
复制到剪贴板...
 
 热帖排行
 
 
 
 
 
©2005- 王朝网络 版权所有