天天看點

性能測試教育訓練總結-從遠端機器打開TXT檔案

int *fp;

fp = (int*) fopen("\\\\machine_name\\shared_name\\dir_name\\filename","attribute");//該函數具體看檢視幫助手冊

long stream;

char file_path[100];

Action()

{

sprintf(file_path,"%s\\yourfile.txt",lr_get_attrib_string("usr"));

if((stream = fopen(file_path,"r"))!=NULL)

lr_output_message(file_path);

fclose( stream );

}

else

lr_output_message("the file can't be opened");

return0;

本文轉自 小強測試幫 51CTO部落格,原文連結:http://blog.51cto.com/xqtesting/1205615,如需轉載請自行聯系原作者

繼續閱讀