Re: Line by line
| From: | Andreas D. Landmark | Date: | Fri, 28 Sep 2001 01:00:34 +0000 |
| Subject: | Re: Line by line | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-12811@lists.php.net to get a copy of this message | ||
At 28.09.2001 01:45, Devon wrote:
Below is my source that sipply opens a file <?php $fp = fopen ("http://localhost/Install.txt", "r"); if ($fp) { print"The file exists!"; } else { print"The file does not exist"; } ?> I Need to be able to a. print the file out b. The file must be printed out line by line c. Write each seperate line to a mysql data base in different tables. Any help would be awsome CheersThis has nothing to do with database problems, read up in the manual about fget*() and the mysql functions, if you then have any problems with the database part then come back and ask again... hint: mysql_connect("database", "user", "pass"); mysql_select_db("my_db"); mysql_query("insert into x (my_column) values (\"".addslashes($my_val) . "\")"); mysql_close(); there you go, that's everything you need! -- Andreas D Landmark / noXtension Real Time, adj.: Here and now, as opposed to fake time, which only occurs there and then.