2
I am loading an html file and would like to modify urls within it so that the system recognizes the actual path of each file that 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’t do it. Someone can help me??
Explaining better, I would like to modify the urls that are inside the html being that what I have and the final result follow below:
// 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"); ?>">
Hello, I can explain the problem better ?
– Edilson
@Edilson wrote there at the end of the question something that should summarize. Thank you for your attention.
– Marcos Vinicius
Do you just want to change the urls within href? There is something in common among all the urls that you want to change?
– JuniorNunes