• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
site_url not working on the server

#1
[eluser]dinisptc[/eluser]
site_url not working on the server

Code:
<a href="&lt;?= site_url('user/profile') ?&gt;"><img src="&lt;?php echo base_url()." alt="profile"></a>

if i do it like this it works


Code:
<a href="&lt;?php echo site_url('user/profile') ?&gt;"><img src="&lt;?php echo base_url()."alt="profile"></a>

on the localhost it works and in another server

maybe the server should have something installed on the php

#2
[eluser]Aken[/eluser]
Make sure PHP short tags are enabled on your server.

#3
[eluser]CroNiX[/eluser]
Or enable it in the config, if you don't want to have to rely on the servers php settings.
Code:
$config['rewrite_short_tags'] = TRUE;

#4
[eluser]p5systems[/eluser]
Hi,

Check your base_url in config.php

Code:
<a href="&lt;?php echo site_url('user/profile') ?&gt;"><img src="&lt;?php echo base_url(); ?&gt;"alt="profile"></a>

Thanks.

#5
[eluser]Aken[/eluser]
[quote author="p5systems" date="1360730579"]Hi,

Check your base_url in config.php

Code:
<a href="&lt;?php echo site_url('user/profile') ?&gt;"><img src="&lt;?php echo base_url(); ?&gt;"alt="profile"></a>

Thanks.[/quote]
Unrelated and unhelpful.

#6
[eluser]Aken[/eluser]
For crying out loud...

#7
[eluser]rana[/eluser]
Its better not to use short tag at all.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


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