Copy link to clipboard
Copied
Hi,
I'm using Dreamweaver (PHP/MySQL) using Xampp as a server, on a mac plateforme : Intel - Snow leopard 10.6.7.
I made up a database using phpMyadmin : It looks like this :
Artistes names @pictures Biographies
artiste 1 images/picture1.jpg 1- Lorem ipsum dolor sit amet........
artiste 2 images/picture2.jpg 2- Lorem ipsum dolor sit amet........
and so on....
Now Calling the Database & using the Bindings, I get everything working fine!
My Question is :
I want to use text file in the Biographies field : so instead of inserting the text directly in my database, I would like to use .txt files.
My database will look like this :
Artistes names @pictures Biographies
artiste 1 images/picture1.jpg file1.txt
artiste 2 images/picture2.jpg file2.txt
and so on...
How to make the textes inside the .txt files, show up in my page, as the pictures do!, and do I have to add the "@" before "Biographies" as with "@pictures".
Any Help Please?
Thank U.
Copy link to clipboard
Copied
Depending on the length of the files you could use file_get_contents to print the string. Or you can use the fopen, fread, fclose commands. Links are below. How much data are we talking about and is there HTML that needs to be parsed in the text file or is it all plain text?
http://www.php.net/manual/en/function.file-get-contents.php
http://www.php.net/manual/en/function.fread.php
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more