954,604 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

PHP - delete ,copy ,read and edit file buttons

I have to make a folder listing, which I've created:

$dirPath = '.';


if ($handle = opendir($dirPath)) {


   while (false !== ($file = readdir($handle))) {

      
      if ($file != "." && $file != "..") {
         if (is_dir("$dirPath/$file")) {
            echo "<div style='background-color:#0ccccc;'><a href='$file'>$file(directory)</a></div>";
         } else {
            
            echo "<div style='background-color:#0ccccc;'><a href='$file'>$file</a></div>" . filesize($file);
			echo '&nbsp;&nbsp; bites';
         }
      }
   }

   
   closedir($handle);
}


All right, but I can't create the copy ,delete , read and edit buttons.To be sure that I have the permissions I have added an chmod 0777 code in the start of the script.After many tries I can't make still the buttons.

fodor_dask
Newbie Poster
1 post since Jun 2010
Reputation Points: 10
Solved Threads: 0
 

>All right, but I can't create the copy ,delete , read and edit buttons.To be sure that I have the permissions I have added an chmod 0777 code in the start of the script.After many tries I can't make still the buttons.

So what do you want from us?

diafol
Rhod Gilbert Fan (ardav)
Moderator
7,800 posts since Oct 2006
Reputation Points: 1,170
Solved Threads: 1,080
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: