www.webdeveloper.com
Results 1 to 2 of 2

Thread: insert file row in database

  1. #1
    Join Date
    Jul 2007
    Posts
    2

    insert file row in database

    hello all
    whats up ?!!

    i need help i have to do a script
    that take all file in a specific folder one by one and insert row in mysql
    plz any one can help me ??

  2. #2
    Join Date
    Apr 2007
    Posts
    1,664
    Quote Originally Posted by etusha
    hello all
    whats up ?!!
    The price of corn


    Quote Originally Posted by etusha
    i need help i have to do a script
    that take all file in a specific folder one by one and insert row in mysql
    plz any one can help me ??
    To open a director you can use these functions.

    opendir() and readdir()
    http://us2.php.net/manual/en/function.opendir.php
    http://us2.php.net/manual/en/function.readdir.php

    or Glob()
    http://us2.php.net/manual/en/function.glob.php

    But what do you want to do next? Read the file names into SQL or the content of the files (the above will give you these)? Do you want each line of each file into a new line in SQL if so use file() or each file's contents into a line of SQL then use file_get_contents();

    If you want help please write more detail in your question then we don't waste time by guessing.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles