How to convert this given tutorial video(php core) into codeigniter(elasticsearch:9200) -


i newbie codeigniter , chance learn alot it. wanted include elasticsearch in codeigniter , searched tutorial vedios there nothing can find , last followed tutorial can make changes , include in codeigniter . struck . anyhelp great. thank in advance.

<?php  require_once 'vendor/autoload.php';  $es= new elasticsearch\client([ 'hosts' => ['127.0.0.1:9200'] ]); 

i wanted code codeigniter . init.php file inside app folder when follow tutorial. there no tutorials include elasticsearch , codeigniter.

i have followed following tutorials

ref : https://www.youtube.com/watch?v=3xb1dhlg-lk

enter image description here

after trying github demo. given below.i have included files needed , tried add index got error.

$insert_data = array('carrier' => $this->input->post('carrier'),                 'shipping_type' => $this->input->post('shipping_type'),                 'description' => $this->input->post('description'),                 'restrictions' => $this->input->post('restrictions'),                 'vendor_id' => $vendor_id,                 'created_at' => date('y-m-d h:i:s'),                 'updated_at' => date('y-m-d h:i:s'),             );             if ($insert_data != null) {                 $insert_data = $this->shipping_options_model->insert($insert_data);                 var_dump($this->elasticsearch->add("people", $insert_data, $insert_data));                 exit; 

to use gd library have enable gd library in php.ini file

extension=php_gd2.dll 

and restart server

example

<?php /**  * php gd  * create simple image gd library  *   */ //setting image header in order proper display image header("content-type: image/png"); //try create image $im = @imagecreate(800, 600)     or die("cannot initialize new gd image stream"); //set background color of image $background_color = imagecolorallocate($im, 0xff, 0xcc, 0xdd); //set color text $text_color = imagecolorallocate($im, 133, 14, 91); //adf string image imagestring($im, 5, 300, 300,  "i'm pretty picture:))", $text_color); //outputs image png imagepng($im); //frees memory associated image  imagedestroy($im); ?> 

ref:

http://code.runnable.com/unf1kdvayk91aadh/how-to-create-a-simple-image-with-gd-library-for-php


Comments

Popular posts from this blog

python - How to insert QWidgets in the middle of a Layout? -

python - serve multiple gunicorn django instances under nginx ubuntu -

module - Prestashop displayPaymentReturn hook url -