Yesterday I made a website for my project, which by means of a list of all php files in a folder is generated. Now I want it on a certain page (the administration) is possible for files to remove the server so that other users no longer will see. The list where the users file list is created that is independent of management, so users will not have these options.
Anyway, back to the file management. I would prefer that the management is possible by means of clicking a small image (of a cross, etc., but iig an image) the files to delete. Well I know you with php unlink a file can delete, but my question is how I unlink function that plate coupling. I tried with onclick, but I was not (though the chance is very great that I have done something wrong). Who can explain to me how it should?
The code that generates the list is sufficient:
Code:
<? php
if ($ handle = opendir ( "uploads /")) (
while (false! == ($ file = readdir ($ handle)))
(
if ($ file! = "." & & $ file! = "..")
(
$ thelist .= '<a href="uploads/'.$file.'" target="_blank">. $ file. "</ a>';
)
)
closedir ($ handle);
)
>
<P> Below is the list of files: </ p>
<P> <? = $ Thelist> </ p>
It must be behind that </ a> too. Has anyone an idea?
Bookmarks