• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
site_url() does not work with alternate config

#1
Hello guys i have 2 projects.
1 Front 
1 Admin

i have 2 separate folders for each project so in first project i have this config
FRONT Base_url = http://example.com
ADMIN Base_url = http://example.com/admin

In admin i want to use a config to create links for the FRONT

So i am trying to use this site_url with the Alternate configuration File

PHP Code:
$config = new \Config\AppFront();

echo 
site_url('test',NULL$config); 

But it gives me the same URL for the admin
http://example.com/admin/test

Expected result
http://example.com/test

I have this Config File
PHP Code:
<?php namespace Config;

use 
CodeIgniter\Config\BaseConfig;

class 
FrontApp extends BaseConfig
{
    public 
$baseURL 'https://example.com/';

    public 
$indexPage '';

    public 
$uriProtocol 'REQUEST_URI';


Maybe this is a bug ? Or i am using this alternate config file wrong ?
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.