摘要:
c语言:#include <stdio.h>#define MAX_LINE 100FILE *fp;char line[] = "";void main() { fp = fopen("test.txt", "r"); while (fgets (line, MAX_LINE, fp) != NULL) { printf("%s", line); } fclose(fp);}php:<?php$fp = fopen('test.txt', 'r');while($ 阅读全文