#include #include int main(int argc, char *argv[]) { FILE *fp; char line[1000]; //char * file = "~/sf/htdocs/app/data.txt"; char * file = "/home/mjb/sf/htdocs/app/data.txt"; if ((fp = fopen (file, "r")) == NULL) { perror("couldnt open:"); exit (1); } while (fgets(line, 999, fp) != NULL) printf("%s", line); fclose (fp); }