|
|
|
|
![]() ![]() |
Nov 24 2006, 08:48 PM
Post
#1
|
|
|
Guilty Until Proven Innocent Group: Members Posts: 372 Joined: 13-April 05 Member No.: 3,937 |
i have this problem regarding file access
seems that my admin host or the server system itself have locked up the acces to create new file, delete[unlink] a file.. change file permissions and such controls to file.. someone told me to use php shell script.. can you help me out here? ******** i just need to find out how to use php shell script and add it to my php scripts to delete a file.. thanks |
|
|
|
Nov 24 2006, 10:41 PM
Post
#2
|
|
|
BUG.SWAT.PATROL Group: Members Posts: 626 Joined: 1-September 04 From: Auckland, New Zealand Member No.: 27 |
You mentioned the method to remove a file using http://php.net/unlink , have you looked at that?
Why the file is locked, could be a number of reasons, you're not the owner or a super user who can remove that file, it's in use so locked for that reason and possibly a number of other reasons. PHP Shell is just the same as using PHP on the web, it's just ran in a command line way, so it's not different than doing it through a page. How are you trying to remove the file, via FTP? If that's not working and you can't upload a file, or edit it etc, then you might have to ask your host for support to find out why this is happening, they could be doing some server updates/changes and have locked it for these reasons so you don't corrupt anything on your server while these changes are happening. Cheers, MC |
|
|
|
Nov 25 2006, 11:18 PM
Post
#3
|
|
|
Colonel Panic Group: [MODERATOR] Posts: 2,730 Joined: 25-March 05 From: Toronto, Ontario, Canada Member No.: 3,233 |
if it uses UNIX commands then you can simply type in
rm (file) else you must refer to the documentation or check how to use the batch command for DOS. xboxrulz |
|
|
|
Nov 26 2006, 12:32 PM
Post
#4
|
|
|
Member [ Level 2 ] Group: Members Posts: 53 Joined: 11-November 06 Member No.: 17,170 |
by shell commend its rm |file anme|
you can create your own file with the name "delete.now" with 777 chmod that acctually is a shell file in file get the name by run coomend, give chmod 777 and rm it GET for shell run commend is $1 for first e.g "delete.now" : chmod 777 $1 & rm $1 "run.php" : <?php $file="file.name"; system("./delete.now ".$file); ?> i hope that helps NoMore |
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 5th September 2008 - 05:48 AM |