creating thumbnail in codeigniter
public function do_resize()
{
$filename = $this->input->post('new_val');
$source_path = $_SERVER['DOCUMENT_ROOT'] . '/uploads/avatar/tmp/' . $filename;
$target_path = $_SERVER['DOCUMENT_ROOT'] . '/uploads/avatar/';
$config_manip = array(
'image_library' => 'gd2',
'source_image' => $source_path,
'new_image' => $target_path,
'maintain_ratio' => TRUE,
'create_thumb' => TRUE,
'thumb_marker' => '_thumb',
'width' => 150,
'height' => 150
);
$this->load->library('image_lib', $config_manip);
if (!$this->image_lib->resize()) {
echo $this->image_lib->display_errors();
}
// clear //
$this->image_lib->clear();
}
Also in PHP:
- check if lenghth of string is 11 in php
- email in ctf
- base encode64 php
- check string for value php
- array_reverse in php example
- calling folder and out into folder in php
- functions returns a random number php
- datetime(today, Mtime) php
- carbon random future date
- clearing cache on live site laravel
- count variable lenth in php
- date / time formatter php
- check composer version php
- create new record via model in laravel
- What was the old name of PHP?
- create project via composer
- date and time in php
- check if key exists array php
- Laravel 8 seed
- find string exist in string php
- check string contain php
- debuggin native php
- check version of php using composer
- count number of char in a string php