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!
hey guys,
i would like to know how i can read a folder, i have folder called "scripts" which has .zip files in it, i would like to read the file names in "scripts" folder and then show them on a page.
by the way, can i remove ".zip" bit and just show the filename?
e.g. filename = password.php
Show filename = Password
i hope i am makeing sense here
thanks guys, if someone can help i would be really greateful.
hmm, sorry i forgot to tell you that i need to read 1 file at a time so i can display it as a link, these codes show all the files in the folder so i can't use them as links.
I have nothing to hide
hiding the script file's name is useless if you let the script display the contents of it's own directory since any user can see it anyway - it's in the link, isn't it?
Well seeing as he's displaying the contents of a directory for scripts that he wants people to be able to download (I'm assuming), then there's no point in displaying index.php; to the user, it's just something useless that doesn't belong there.
but how would you make it list just certin file types? with that script, you have to desiginate specific files to exclude from being listed. I need a script that shows only .inc files, so what would I add to that script?