PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
How do you list certain files in php? Like it looks in a directory and lists all files that ends with *.jpg (NOT *tb.jpg... need to restrict that). So I could use that array or whatever to perform image resizing of all original images into thumbnail with a loop function... the problem is, I have absolutely no idea how to do it. Anybody has an idea?
ok so define(MAX_WIDTH, '150'); would just work in function automatically -- not like variables do.. like they have to be global-ized in function to work?
.. wait... if I defined that in a file and have a script in other page.. and I don't refer it to that file... it would still work? :O
the define() call must be run for each page request unless you're doing some unusual php trickery.. and remember to quote the first argument as it's not a constant yet!