Codeigniter echoing [::1] instead of localhost

Codeigniter echoing [::1] instead of localhost

I am using CodeIgniter 3.16 as a web platform and when redirecting with uri. I’m doing so by using CodeIgniter’s base_url() method in the href property for redirect.

base_url() echoes the domain has being [::1] and not localhost as I’ve typed into the browser.

For some reason, it is not appears to me the editor. It happening because of   [::1] is showing in url instead of  localhost as the same host, or maybe I’m just being dumb.

 

 

What exactly is causing php to echo such a path ?

Its because of your base_url is empty.

In config/config.php

$config['base_url'] = 'http://localhost/project_name';

 

TinyMCE URL Conversion Example

relative_urls : false,
remove_script_host : false,
convert_urls : true,
LIKE::
<script>

tinymce.init({

       selector: '.rte',

       height: 500,

       theme: 'modern',

       plugins: [

              'lists link image media',

              'searchreplace visualblocks code fullscreen',

              'insertdatetime table contextmenu paste',

             'textcolor'

            ],

      toolbar1: 'undo redo | styleselect | bold italic underline | forecolor backcolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image media',

       image_advtab: true,

       templates: [

             { title: 'Test template 1', content: 'Test 1' },

            { title: 'Test template 2', content: 'Test 2' }

       ],

      content_css: [

               '//fonts.googleapis.com/css?family=Lato:300,300i,400,400i',

              '//www.tinymce.com/css/codepen.min.css'

      ],

      relative_urls : false,

      remove_script_host : false,

      convert_urls : true,

});

</script>

Get TinyMCE to use full image url instead of relative one

#Get TinyMCE to use full image url instead of relative one
Make sure in the javascript initialization you are using, that you have these lines in it:
relative_urls : false,
remove_script_host : false,
convert_urls : true,
LIKE::
<script>
tinymce.init({
       selector: ‘.rte’,
      height: 500,
      theme: ‘modern’,
      plugins: [
              ‘lists link image media’,
              ‘searchreplace visualblocks code fullscreen’,
              ‘insertdatetime table contextmenu paste’,
              ‘textcolor’
       ],
       toolbar1: ‘undo redo | styleselect | bold italic underline | forecolor backcolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image media’,
        image_advtab: true,
        templates: [
               { title: ‘Test template 1’, content: ‘Test 1’ },
               { title: ‘Test template 2’, content: ‘Test 2’ }
         ],
        content_css: [
                ‘//www.tinymce.com/css/codepen.min.css
         ],
        relative_urls : false,
       remove_script_host : false,
       convert_urls : true,
});
</script>

Ck editor options

Description: <textarea cols=”80″ id=”editor_ckxhr” name=”description” placeholder=”Enter Description” id=”description” rows=”5″></textarea> <script type=”text/javascript”>             CKEDITOR.replace(‘editor_ckxhr’,                 {                           height: ‘300px’,        enterMode: CKEDITOR.ENTER_BR,                 … Read moreCk editor options

ck editor options

 ## CK EDITOR OPTIONS::    <script type=”text/javascript”> CKEDITOR.replace(‘editor_office2003’, { height: ‘300px’, enterMode: CKEDITOR.ENTER_BR, toolbar: [ { name: ‘document’, groups: [‘document’, ‘doctools’], items: [‘Save’, ‘NewPage’, ‘Preview’, ‘Print’, ‘-‘, ‘Templates’] }, { name: ‘clipboard’, groups: [‘clipboard’, ‘undo’], items: [‘Cut’, ‘Copy’, ‘Paste’, ‘PasteText’, ‘PasteFromWord’, ‘-‘, ‘Undo’, ‘Redo’] }, { name: ‘paragraph’, groups: [‘list’, ‘indent’, ‘blocks’, ‘align’, ‘bidi’], items: … Read moreck editor options