I need to create a script in PHP to fetch and manipulate some data. It needs to do the following:
1. Allow the user to browse and select a folder containing files. The folder will contain a number of files sequentially numbered. Half will be .jpg and half will be .txt. The filenames will match. (file1.jpg and file1.txt)
2. Take the name of the jpg file and set as variable $filename.
3. Take the text content of the corresponding txt file and set it as variable $text.
4. Take the base filename and split it into two parts (file and 1) and add those values to variables $file and $number.
5. Repeat until all of the files in the folder have been processed.
I don't think any of this is mysql, just some data manipulation before adding the variables to the database.
Any tips would be appreciated.
1. Allow the user to browse and select a folder containing files. The folder will contain a number of files sequentially numbered. Half will be .jpg and half will be .txt. The filenames will match. (file1.jpg and file1.txt)
2. Take the name of the jpg file and set as variable $filename.
3. Take the text content of the corresponding txt file and set it as variable $text.
4. Take the base filename and split it into two parts (file and 1) and add those values to variables $file and $number.
5. Repeat until all of the files in the folder have been processed.
I don't think any of this is mysql, just some data manipulation before adding the variables to the database.
Any tips would be appreciated.