/ Published in: PHP
Type mode into input than hit Enter
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php while (false !== $file = $dir->read()) { // Skip index file and pointers continue; } $files[] = array('file' => $file, 'uid' => $stat['uid'], 'gid' => $stat['gid'], 'mode' => substr(base_convert($stat['mode'], 10, 8), 2, 4)); } { } ?> <div align="center"> <table border="1" cellspacing="0" cellpadding="5"> <thead> <tr> <th>file</th> <th>uid</th> <th>gid</th> <th>permissions</th> <th>change</th> </tr> </thead> <tbody> <tr> <td><?php echo $files[$i]['file']; ?></td> <td><?php echo $files[$i]['uid']; ?></td> <td><?php echo $files[$i]['gid']; ?></td> <td><?php echo $files[$i]['mode']; ?></td> <td><input type="text" onchange="window.location='<?php echo $_SERVER['PHP_SELF']; ?>?file=<?php echo $i; ?>&chmod='+this.value;" value="<?php echo $files[$i]['mode']; ?>" /></td> </tr> <?php endfor; ?> </tbody> </table> </div>