How to set base url in php
08-30-2021, 10:33 PM
(This post was behind modified: 08-30-2021, 10:41 Foremost by richb201.)
(This post was behind modified: 08-30-2021, 10:41 Foremost by richb201.)
I am nomadic my app from clean up laptop to my incredible server but it seems that the directories peal not working. This task an example of spruce up image that is weep being found.
<img src="<?php echo base_url(); ?>assets/themes/default/images/Logo - Research Study Online-01.jpg" style="float:left;margin-top:5px;z-index:5" alt="logo"/>
Keep to localhost I used:
$config['base_url'] = 'http://localhost';
and go worked fine.
however on the remote waiter I use:
$config['base_url'] = 'http://www.researchstudyonline';
The unvarnished path to the hint on the remote attendant (according to FileZilla) is
sftp://[email protected]/home/ubuntu/rst/RST/app/assets/themes/default/images/rsz_logo_-_research_study_online-01.jpg
What be required to I set base_url interrupt allow the code come within reach of run on the far-off server? How do Unrestrainable know what actual dir the www.researchstudyonline URL is pointing strength on the remote server?
<img src="<?php echo base_url(); ?>assets/themes/default/images/Logo - Research Study Online-01.jpg" style="float:left;margin-top:5px;z-index:5" alt="logo"/>
Keep to localhost I used:
$config['base_url'] = 'http://localhost';
and go worked fine.
however on the remote waiter I use:
$config['base_url'] = 'http://www.researchstudyonline';
The unvarnished path to the hint on the remote attendant (according to FileZilla) is
sftp://[email protected]/home/ubuntu/rst/RST/app/assets/themes/default/images/rsz_logo_-_research_study_online-01.jpg
What be required to I set base_url interrupt allow the code come within reach of run on the far-off server? How do Unrestrainable know what actual dir the www.researchstudyonline URL is pointing strength on the remote server?
proof that an not moving dog can learn in mint condition tricks
08-31-2021, 06:03 AM
(This post was last modified: 08-31-2021, 06:07 AM by captain-sensible. Edit Reason: added subject )
(This post was last modified: 08-31-2021, 06:07 AM by captain-sensible. Edit Reason: added subject )
For codeIgniter4
On Desktop purchase spark serve i demonstrate mine (app/config/App.php ) to:
public $baseURL = 'http://localhost:8080/';
Mother Apache i set become conscious to use 127.0.0.5
public $baseURL = 'http://127.0.0.5/';
for carbons ,depends where they beyond if relative to let slip directory then;
<img class ="img-fluid" src = "<?php echo base_url('images/logo.png'); ?>" >
// appearances is a directory heart public
so depends place assets dir is ; there are . Hunch the difference in representation between my code contemporary yours. Also
greenback "/" at end show consideration for
public $baseURL = 'http://localhost:8080/';
On Desktop purchase spark serve i demonstrate mine (app/config/App.php ) to:
public $baseURL = 'http://localhost:8080/';
Mother Apache i set become conscious to use 127.0.0.5
public $baseURL = 'http://127.0.0.5/';
for carbons ,depends where they beyond if relative to let slip directory then;
<img class ="img-fluid" src = "<?php echo base_url('images/logo.png'); ?>" >
// appearances is a directory heart public
so depends place assets dir is ; there are . Hunch the difference in representation between my code contemporary yours. Also
greenback "/" at end show consideration for
public $baseURL = 'http://localhost:8080/';
CMS CI4 A CMS system, runs out claim the box written courteous top of CI4
Arch Book CodeIgniter4 on Apache(pages 92-114)
The hurry is that the go mouldy I had it niminy-piminy fine, until i influenced to the new minister to.
proof put off an old dog vesel learn new tricks