NameSilo

Deleting a file with php

SpaceshipSpaceship
SpaceshipSpaceship
Namecheap AuctionsNamecheap Auctions
Watch

TwiztedFake

Established Member
Impact
1
I need a simple way to delete an image file via php from a directory on my server.
 
0
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
0
Close
Try using:

PHP:
<?php
echo delete("target.txt");
?>
 
0
Close
unlink() is the correct method. You need permission to the file.
 
0
Close
Thankyou SecondVersion should be much simpler than what I was looking to do.
 
0
Close
Appraise.net

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

New: watch any domain
You can now watch domains on NamePros. We check each one and notify you when something changes. Search for a domain and press Watch on...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back