I'm loading an html file and would like to modify urls inside it so that the system recognizes the actual path of every file the html is trying to access, so I have several different urls:
<link rel="stylesheet" href="assets/vendor/font-awesome/css/font-awesome.css">
<link rel="stylesheet" href="assets/vendor/magnific-popup/magnific-popup.css">
<link rel="stylesheet" href="assets/vendor/bootstrap-datepicker/css/bootstrap-datepicker3.css">
// Function
public function index()
{
$layout = $this->uri->segment(2);
$arquivo = read_file("/public_html/application/views/porto/{$layout}.php");
I would like to wrap these urls with <?php echo base_url("urlaqui") ?>
but I can not do this. Can anyone help me ??
Explaining better, I would like to modify the urls that are in the html, and what I have and the final result follow:
// O que eu tenho ...
<link rel="stylesheet" href="assets/vendor/font-awesome/css/font-awesome.css">
// O que eu preciso ...
<link rel="stylesheet" href="<?php echo base_url("assets/vendor/font-awesome/css/font-awesome.css"); ?>">