Search
 
SCRIPT & CODE EXAMPLE
 

PHP

php copy image from one folder to another

<?php
$imagePath = "/var/www/projectName/Images/somepic.jpg";
$newPath = "/test/Uploads/";
$ext = '.jpg';
$newName  = $newPath."a".$ext;

$copied = copy($imagePath , $newName);

if ((!$copied)) 
{
    echo "Error : Not Copied";
}
else
{ 
    echo "Copied Successful";
}
?>
Comment

PREVIOUS NEXT
Code Example
Php :: php get all txt files in directory 
Php :: How to Disable the WordPress JSON REST API Without Plugin 
Php :: php remove first and last char 
Php :: Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress. 
Php :: laravel assign active based on route name 
Php :: laravel updateorcreate 
Php :: call metho din config laravel 
Php :: laravel any error 
Php :: apache not executing php 
Php :: woocommerce_order_status_changed 
Php :: php convert unix time to date 
Php :: php laravel xml to json 
Php :: full name validation laravel 
Php :: php time how long a function takes 
Php :: laravel collection tojson 
Php :: php int min 
Php :: laravel collection filter 
Php :: sql where count greater than 
Php :: regex for email php 
Php :: how to add attribute to the request object in laravel 
Php :: php get class name of this 
Php :: allert in php 
Php :: how to debug php 
Php :: php format datetime 
Php :: return redirect with message laravel 
Php :: redirect wordpress 
Php :: date format php 
Php :: laravel gigapay update employee 
Php :: foreach range php 
Php :: get DAYS absent from working days from given date range 
ADD CONTENT
Topic
Content
Source link
Name
1+2 =