Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [apache@h185 default]$ ls -l /home/www/default/p.php
- -rwxr-xr-x. 1 zhouhh zhouhh 50837 Aug 28 19:02 /home/www/default/p.php
- [apache@h185 default]$ ls -l /usr/bin/rrdtool
- -rwxr-xr-x. 1 root root 24688 Aug 21 2010 /usr/bin/rrdtool
- [apache@h185 default]$ ls -l /root/my.cnf
- ls: cannot access /root/my.cnf: Permission denied
- [apache@h185 default]$ ls -l /usr/bin/ld
- -rwxr-xr-x. 1 root root 594968 Jun 22 22:06 /usr/bin/ld
- [apache@h185 default]$ ls -l /usr/bin/php
- -rwxr-xr-x. 1 root root 3224944 Jul 4 00:57 /usr/bin/php
- [apache@h185 default]$ vi test.php
- [apache@h185 default]$ cat test.php
- <?php
- #if(is_file('/home/www/default/p.php'))
- #if(is_file('/usr/bin/rrdtool'))
- #if(is_file('/root/my.cnf'))
- #if(is_file('/usr/bin/ld'))
- #if(file_exists('/usr/bin/ld'))
- if(is_file('/usr/bin/php'))
- {
- print 'ok';
- }
- else
- {
- print 'no ok';
- }
- ?>
- [apache@h185 default]$
- if(!is_dir($filename)) {
- //remove a file
- unlink($filename);
- } else {
- //remove a directory
- }
Add Comment
Please, Sign In to add comment