Displaying Video Description
Moderator: General Moderators
Displaying Video Description
Using PHP I am scanning a directory for .AVI files then listing the file names and sizes as links to play them. I do not want to display the file names, but rather a description of the file. I do not want to use a database. Can this be done? I know that an image stores a description (by right-clicking and viewing the images properties).
Nah, with that way each AVI should have its own TXT.
If the information isn't going to be changing much, why not use [php_man]switch[/php_man]() and set a $description variable for each of the filenames. Unless of course embedding the data within the code is a bad solution for you. Sometimes I do it this way, sometimes I use a DB or TXT/HTML file.
If the information isn't going to be changing much, why not use [php_man]switch[/php_man]() and set a $description variable for each of the filenames. Unless of course embedding the data within the code is a bad solution for you. Sometimes I do it this way, sometimes I use a DB or TXT/HTML file.
If going for the multible textfiles solution;
To ease up on the handling of this a text file with the identical name (except the .avi/.txt extension of course) is one idea.
A very simple but understandable example:
To ease up on the handling of this a text file with the identical name (except the .avi/.txt extension of course) is one idea.
A very simple but understandable example:
Code: Select all
$filename = 'my_name_is_foo.avi';
$text = substr($filename,-3); // my_name_is_foo
include($text.'.txt'); // my_name_is_foo.txt holding the description