Jump to content


This topic is now archived and is closed to further replies.


2 unrelated php questions... folder names and id3 tags

Recommended Posts

2 unrelated questions here...

how can I set a variable to contain the folder in which the current php file is being read from? for instance...


how could I get a variable to contain "omglol"?


Also, can php read mp3 ID3 tags? If so, how?


Share this post

Link to post
Share on other sites
[quote author=zanus link=topic=107972.msg433951#msg433951 date=1158213935]
Question 1
yes, use dirname($path);

Question 2
yes, id3_get_tag($filename);

so... if I put...

echo $path;

that should echo the folder of the file I'm reading?

also, can you explain id3_get_tag($filename); some more? There are many ID3 tags, which does that function retrieve? I'd want to seperate artist, title, album, etc.

edit: I see that the id3 thing sets the id3 parts as an array, so I got that, and I just got the directory code working using this code:
echo "$page is in $dir";

Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.