Guest User

Untitled

a guest
Mar 20th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. [apache@h185 default]$ ls -l /home/www/default/p.php
  2. -rwxr-xr-x. 1 zhouhh zhouhh 50837 Aug 28 19:02 /home/www/default/p.php
  3. [apache@h185 default]$ ls -l /usr/bin/rrdtool
  4. -rwxr-xr-x. 1 root root 24688 Aug 21 2010 /usr/bin/rrdtool
  5. [apache@h185 default]$ ls -l /root/my.cnf
  6. ls: cannot access /root/my.cnf: Permission denied
  7. [apache@h185 default]$ ls -l /usr/bin/ld
  8. -rwxr-xr-x. 1 root root 594968 Jun 22 22:06 /usr/bin/ld
  9. [apache@h185 default]$ ls -l /usr/bin/php
  10. -rwxr-xr-x. 1 root root 3224944 Jul 4 00:57 /usr/bin/php
  11. [apache@h185 default]$ vi test.php
  12. [apache@h185 default]$ cat test.php
  13. <?php
  14. #if(is_file('/home/www/default/p.php'))
  15.  
  16. #if(is_file('/usr/bin/rrdtool'))
  17. #if(is_file('/root/my.cnf'))
  18. #if(is_file('/usr/bin/ld'))
  19. #if(file_exists('/usr/bin/ld'))
  20. if(is_file('/usr/bin/php'))
  21. {
  22. print 'ok';
  23. }
  24. else
  25. {
  26. print 'no ok';
  27. }
  28. ?>
  29. [apache@h185 default]$
  30.  
  31. if(!is_dir($filename)) {
  32. //remove a file
  33. unlink($filename);
  34. } else {
  35. //remove a directory
  36. }
Add Comment
Please, Sign In to add comment