Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7939145
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T23:00:46+00:00 2026-06-03T23:00:46+00:00

I am calling the php unlink() function on a directory ( user-images/1/p/ ) containing

  • 0

I am calling the php unlink() function on a directory (user-images/1/p/) containing the following files:

1.jpg
1-s.jpg
1big.jpg
2.jpg
2-s.jpg
2big.jpg

The actual call itself is as follows:

unlink('user-images/1/p/1big.jpg');

Instead of just deleting 1big.jpg, it deletes all files with a 1 in them (1big.jpg, 1-s.jpg, 1.jpg). I’ve researched this quite a bit and can’t seem to find anyone posting with a similar issue.

EDIT:
below is the full script, not much there really, don’t see how anything could be affected. I’ve never seen this before either 🙁

<?PHP
unlink('user-images/1/p/1.jpg');
unlink('user-images/1/p/1-s.jpg');
$uid = '1';
$fileName = '467';
$image = '/friskyfriends/user-images/1/p/1-big.jpg';
$width = 320;
$height = 320;
buildPics();
//buildPics($uid,$fileName,$image,$width,$height);
?>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T23:00:47+00:00Added an answer on June 3, 2026 at 11:00 pm

    When running the php file with only the unlink code in it, it worked fine. I traced through the rest of my includes (took forever 🙁 ) and found some issues in coding before. Still not sure why that affected a static unlink() call. That said, it was an issue elsewhere in the code which has been resolved. I appreciate the time and effort everyone put forth to help me troubleshoot this issue…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am calling a php function using ajax call but its not working. I
I have a .php that registers a user by calling another php function but
I'm calling a php function from my $.ajax call to add a new item
What are the 'costs' involved in calling an empty PHP function? The main purpose
I have a PHP script that I'm calling with the .post() function in jQuery.
when user clicks on login button (index.php) I am calling chechlogin.php where I am
I have a Python file I'm calling with PHP's exec function. Python then outputs
When calling php via cli, the current directory is NOT changed to the one
I have a function that is calling a php page on a remote server
I'm calling a PHP file with XMLHttpRequest, but now the call doesn't complete and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.