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 7972457
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T07:52:25+00:00 2026-06-04T07:52:25+00:00

I am trying to figure out where its putting the new resized image here.

  • 0

I am trying to figure out where its putting the new resized image here.

function createFile($output_filename = null,$imageNewName) {
        if($this->ext == "JPG" OR $this->ext == "JPEG") {
            imageJPEG($this->dst_r, $this->uploaddir.$imageNewName.'.'.$this->ext, $this->quality);
        } elseif($this->ext == "PNG") {
            imagePNG($this->dst_r, $this->uploaddir.$imageNewName.'.'.$this->ext);
        } elseif($this->ext == "GIF") {
            imageGIF($this->dst_r, $this->uploaddir.$imageNewName.'.'.$this->ext);
        }
        $this->output = $this->uploaddir. $imageNewName;

        echo $this->uploaddir. $imageNewName .'.'.$this->ext;
}

function resize($newWidth, $newHeight) {
    $width = imagesx($this->img_r);
    $height = imagesy($this->img_r);

    $newWidth = $newWidth;
    $newHeight = $newHeight;

    $this->dst_r = ImageCreateTrueColor($newWidth, $newHeight);
    imagecopyresampled($this->dst_r, $this->img_r, 0, 0, 0, 0, $newWidth, $newHeight, $width, $height);
    $this->img_r = $this->dst_r;
    $this->img_h = $newHeight;
    $this->img_w = $newWidth;
}

    $tempFile = $_FILES['Filedata']['tmp_name'];
    $targetPath = $_SERVER['DOCUMENT_ROOT'] . $_REQUEST['folder'] . '/img/nonfb/';

$fileNameBase  = $_FILES['Filedata']['name'];
$extension = pathinfo($fileNameBase, PATHINFO_EXTENSION);   
$fileNameNEW = $imageNewName . '.' . $extension;

$targetFile =  str_replace('//','/',$targetPath) . $fileNameNEW;
echo 'TARGET=' . $targetFile;

move_uploaded_file ($tempFile, $targetFile);

$image = new Image();
$image->setFile($targetFile);
$image->setUploadDir($targetPath);
$image->resize(50,50);
$image->createFile(md5($tempFile,$fileNameNEW));
$image->flush()

I can tell its taking the dst_r as the current image and img_r as the resource image but im not sure how to use echo on those to find out their values. What i am trying to do is find out where its placing that resized image so i can rename it.

Any help would be great!

  • 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-04T07:52:27+00:00Added an answer on June 4, 2026 at 7:52 am

    I assume this code resides in a class. As in line 9 of the createFile function, the file will probably reside at this path:

    echo $this->uploaddir. $imageNewName .'.'.$this->ext;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been trying to figure this out now for a few hours and its
I am new to SharePoint technologies and trying to figure out its suitability for
I've been trying to figure this out but its starting to make me want
I'm trying to figure out if its possible to stop a foreach loop in
Trying to figure out how I can do this properly. The print_r looks like
trying to figure out why this is happening - I have an input text
I'm trying to figure out if its possible to change the routeTemplate format of
This is a lot of code but I'm at ends here trying to figure
I apologize if this question is slightly subjective... I am trying to figure out
I'm trying to figure out if its possible to loop a foreach loop in

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.