;;姓名: | ;
;; | ;
by
txkss
-
PHP
-
2005-04-18 19:33:36 阅读(1298) 回复(4)
FILE* fp;
fp=fopen("/var/log/ppp-off","w+");
但是打开的文件没有执行权限,不知道该如何在程序中修改文件的权限为可执行的?
:outu: :outu:
谁遇到过这个问题么 ?
用fopen()打开远程文件,并fwrite()文件,如何实现呢?
在linux as3下运行fdisk增加一分区,然后用mke2fs创建文件系统,提示:
mke2fs: Device size reported to be zero. Invalid partition specified, or partition table wasn't reread after running fdisk, due to a modified partition being busy and in use. You may need to reboot to re-read your partition table.
难道新增分区后必须要重启才能创建文件系统吗?那岂不是很弱智?
400上一段c程序
FILE *fp;
char asFilNam[]= "/home/a.txt";
fp = fopen( asFilNam, "w");
if( fp == NULL)
{
printf( "open file error!");
exit( 0);
}
但是在fopen时打不开文件,fp为NULL
难道在C语言中只能对PF文件读写么?不能对/home目录下的*.txt文件操作?
如何操作?
谢谢
int SleepPolicyManager::delPolicy(char *disk,char *week,char *time,char *space){
int ret=-1;
printf("*************************************** delPolicy ***************************************************\n");
FILE *fr,*fw;
char str[256];
memset(str,0,256);
strcat(str,"* ");
strcat(str,time);
strcat(str," * * ");
strcat(str,week);
strcat(str," /sbin/hdarpm -S ");
strcat(str,space);
strcat(str," ")...
通过IE直接都可以打开的两个文件:
$1:www.sz.net.cn
$2:http://www.easyport.com.cn/ics/SilverStream/Pages/cpgInspectFlowEp.html?ContId=HALU5503797
用fopen可以打开$1,但是打不开$2,下面是出错信息:
Warning: fopen(http://www.easyport.com.cn/ics/SilverStream/Pages/cpgInspectFlowEp.html?ContId=HALU5503797): failed to open stream: HTTP request failed! HTTP/1.1 205 Reset Content in E:\container\esay.php on ...
fopen能否实现打开一个URL文件,例如:
fopen("http://www.test.com/test.txt","r")
是否可行?