<?php echo base_url();?> and <?php base_url();?> -


 <script src='<?php base_url();?>assets/js/jquery.min.js'></script> 

the script above code friend use, works him, if change <?php echo base_url();?> , it's work me, not him.
it's become problem when transfer files each other, supposed ? thank you.


i've solution script case, change config.php : $http = 'http' . ((isset($_server['https']) && $_server['https'] == 'on') ? 's' : '') . '://'; $urlbaru = str_replace("index.php","", $_server['script_name']); $config['base_url'] = "$http" . $_server['server_name'] . "" . $urlbaru;

please show more problem detail paste error code in here use information you.

btw, base_url() isn't php embedded function, 1 of potential problem friend custom function named base_url() supposed return it's root path. so, have either include or build same function same name script.

ex.

function base_url() {   return dirname($_server['script_filename']); } 

and 'src' inside tag should point jquery source file.


Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -