site_url() is not work properly in codeigniter framework Unicorn Meta Zoo #1: Why another podcast? Announcing the arrival of Valued Associate #679: Cesar Manara Data science time! April 2019 and salary with experience The Ask Question Wizard is Live!CodeIgniter not working on localhostHow to use sites_url in codeigniterGoing from a framework to no-frameworkCodeIgniter img taghow to include a file inside a model in codeigniter?codeigniter site_url 404 page not foundAjax not working codeigniterCodeIgniter valid_email() Function Not Working ProperlyCodeigniter working on one server but not on another serverCodeigniter : a href with hash not working in codeigniterCodeigniter 4th level route not workingEcho within an Echo Codeigniter

Is this homebrew racial feat, Stonehide, balanced?

c++ diamond problem - How to call base method only once

Is Bran literally the world's memory?

With indentation set to `0em`, when using a line break, there is still an indentation of a size of a space

What is the term for a person whose job is to place products on shelves in stores?

Married in secret, can marital status in passport be changed at a later date?

Co-worker works way more than he should

Why didn't the Space Shuttle bounce back into space as many times as possible so as to lose a lot of kinetic energy up there?

Raising a bilingual kid. When should we introduce the majority language?

PIC mathematical operations weird problem

Could moose/elk survive in the Amazon forest?

Are these square matrices always diagonalisable?

Why is this method for solving linear equations systems using determinants works?

How would I use different systems of magic when they are capable of the same effects?

What's the difference between using dependency injection with a container and using a service locator?

My admission is revoked after accepting the admission offer

How long after the last departure shall the airport stay open for an emergency return?

What's parked in Mil Moscow helicopter plant?

What to do with someone that cheated their way through university and a PhD program?

"My boss was furious with me and I have been fired" vs. "My boss was furious with me and I was fired"

What do you call the part of a novel that is not dialog?

"Whatever a Russian does, they end up making the Kalashnikov gun"? Are there any similar proverbs in English?

How to translate "red flag" into Spanish?

How to open locks without disable device?



site_url() is not work properly in codeigniter framework



Unicorn Meta Zoo #1: Why another podcast?
Announcing the arrival of Valued Associate #679: Cesar Manara
Data science time! April 2019 and salary with experience
The Ask Question Wizard is Live!CodeIgniter not working on localhostHow to use sites_url in codeigniterGoing from a framework to no-frameworkCodeIgniter img taghow to include a file inside a model in codeigniter?codeigniter site_url 404 page not foundAjax not working codeigniterCodeIgniter valid_email() Function Not Working ProperlyCodeigniter working on one server but not on another serverCodeigniter : a href with hash not working in codeigniterCodeigniter 4th level route not workingEcho within an Echo Codeigniter



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








1















following work not work properly for codeigniter framework...



Its my View:



<?php
echo '<h2>'.$news_item['title'].'</h2>';
echo $news_item['text']."</br></br>";
?>
<a href="<?php site_url("news"); ?>" > Back to Main </a></br></br>









share|improve this question






















  • Did you load URL helper in controller or in autoload? and echo this $this->load->helper('url');

    – Johnny X. Lemonade
    Jan 31 '13 at 10:05












  • Thank you @HonzaM. Its Working........ with echo

    – Pratik Butani AndroidDev
    Jan 31 '13 at 10:11

















1















following work not work properly for codeigniter framework...



Its my View:



<?php
echo '<h2>'.$news_item['title'].'</h2>';
echo $news_item['text']."</br></br>";
?>
<a href="<?php site_url("news"); ?>" > Back to Main </a></br></br>









share|improve this question






















  • Did you load URL helper in controller or in autoload? and echo this $this->load->helper('url');

    – Johnny X. Lemonade
    Jan 31 '13 at 10:05












  • Thank you @HonzaM. Its Working........ with echo

    – Pratik Butani AndroidDev
    Jan 31 '13 at 10:11













1












1








1


0






following work not work properly for codeigniter framework...



Its my View:



<?php
echo '<h2>'.$news_item['title'].'</h2>';
echo $news_item['text']."</br></br>";
?>
<a href="<?php site_url("news"); ?>" > Back to Main </a></br></br>









share|improve this question














following work not work properly for codeigniter framework...



Its my View:



<?php
echo '<h2>'.$news_item['title'].'</h2>';
echo $news_item['text']."</br></br>";
?>
<a href="<?php site_url("news"); ?>" > Back to Main </a></br></br>






codeigniter codeigniter-url






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jan 31 '13 at 10:02









Pratik Butani AndroidDevPratik Butani AndroidDev

31.2k27150275




31.2k27150275












  • Did you load URL helper in controller or in autoload? and echo this $this->load->helper('url');

    – Johnny X. Lemonade
    Jan 31 '13 at 10:05












  • Thank you @HonzaM. Its Working........ with echo

    – Pratik Butani AndroidDev
    Jan 31 '13 at 10:11

















  • Did you load URL helper in controller or in autoload? and echo this $this->load->helper('url');

    – Johnny X. Lemonade
    Jan 31 '13 at 10:05












  • Thank you @HonzaM. Its Working........ with echo

    – Pratik Butani AndroidDev
    Jan 31 '13 at 10:11
















Did you load URL helper in controller or in autoload? and echo this $this->load->helper('url');

– Johnny X. Lemonade
Jan 31 '13 at 10:05






Did you load URL helper in controller or in autoload? and echo this $this->load->helper('url');

– Johnny X. Lemonade
Jan 31 '13 at 10:05














Thank you @HonzaM. Its Working........ with echo

– Pratik Butani AndroidDev
Jan 31 '13 at 10:11





Thank you @HonzaM. Its Working........ with echo

– Pratik Butani AndroidDev
Jan 31 '13 at 10:11












2 Answers
2






active

oldest

votes


















6














You should have loaded the url_helper in your controller construct method or in the function that calls your view like this $this->load->helper('url') and then in your view you should echo the site_url()



<a href="<?php echo site_url("news"); ?>" > Back to Main </a></br></br>`





share|improve this answer























  • Thanks @Sport..... Now Its Working fine after added $this->load->helper('url')

    – Pratik Butani AndroidDev
    Jan 31 '13 at 10:13











  • I was missing echo/print make sure you combine with site_url()

    – wired00
    Mar 16 '14 at 6:16


















3














Did u load url helper



Did u specify the site_url in config file...
->Returns your site URL, as specified in your config file. The index.php file (or whatever you have set as your site index_page in your config file) will be added to the URL, as will any URI segments you pass to the function, and the url_suffix as set in your config file.



If not working try with base_url






share|improve this answer


















  • 1





    echo the base_url or site_url <a href="<?=site_url("news")?>" > Back to Main </a>

    – asvignesh
    Jan 31 '13 at 10:16











Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f14623050%2fsite-url-is-not-work-properly-in-codeigniter-framework%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes









6














You should have loaded the url_helper in your controller construct method or in the function that calls your view like this $this->load->helper('url') and then in your view you should echo the site_url()



<a href="<?php echo site_url("news"); ?>" > Back to Main </a></br></br>`





share|improve this answer























  • Thanks @Sport..... Now Its Working fine after added $this->load->helper('url')

    – Pratik Butani AndroidDev
    Jan 31 '13 at 10:13











  • I was missing echo/print make sure you combine with site_url()

    – wired00
    Mar 16 '14 at 6:16















6














You should have loaded the url_helper in your controller construct method or in the function that calls your view like this $this->load->helper('url') and then in your view you should echo the site_url()



<a href="<?php echo site_url("news"); ?>" > Back to Main </a></br></br>`





share|improve this answer























  • Thanks @Sport..... Now Its Working fine after added $this->load->helper('url')

    – Pratik Butani AndroidDev
    Jan 31 '13 at 10:13











  • I was missing echo/print make sure you combine with site_url()

    – wired00
    Mar 16 '14 at 6:16













6












6








6







You should have loaded the url_helper in your controller construct method or in the function that calls your view like this $this->load->helper('url') and then in your view you should echo the site_url()



<a href="<?php echo site_url("news"); ?>" > Back to Main </a></br></br>`





share|improve this answer













You should have loaded the url_helper in your controller construct method or in the function that calls your view like this $this->load->helper('url') and then in your view you should echo the site_url()



<a href="<?php echo site_url("news"); ?>" > Back to Main </a></br></br>`






share|improve this answer












share|improve this answer



share|improve this answer










answered Jan 31 '13 at 10:04









Vassilis BarzokasVassilis Barzokas

2,02021934




2,02021934












  • Thanks @Sport..... Now Its Working fine after added $this->load->helper('url')

    – Pratik Butani AndroidDev
    Jan 31 '13 at 10:13











  • I was missing echo/print make sure you combine with site_url()

    – wired00
    Mar 16 '14 at 6:16

















  • Thanks @Sport..... Now Its Working fine after added $this->load->helper('url')

    – Pratik Butani AndroidDev
    Jan 31 '13 at 10:13











  • I was missing echo/print make sure you combine with site_url()

    – wired00
    Mar 16 '14 at 6:16
















Thanks @Sport..... Now Its Working fine after added $this->load->helper('url')

– Pratik Butani AndroidDev
Jan 31 '13 at 10:13





Thanks @Sport..... Now Its Working fine after added $this->load->helper('url')

– Pratik Butani AndroidDev
Jan 31 '13 at 10:13













I was missing echo/print make sure you combine with site_url()

– wired00
Mar 16 '14 at 6:16





I was missing echo/print make sure you combine with site_url()

– wired00
Mar 16 '14 at 6:16













3














Did u load url helper



Did u specify the site_url in config file...
->Returns your site URL, as specified in your config file. The index.php file (or whatever you have set as your site index_page in your config file) will be added to the URL, as will any URI segments you pass to the function, and the url_suffix as set in your config file.



If not working try with base_url






share|improve this answer


















  • 1





    echo the base_url or site_url <a href="<?=site_url("news")?>" > Back to Main </a>

    – asvignesh
    Jan 31 '13 at 10:16















3














Did u load url helper



Did u specify the site_url in config file...
->Returns your site URL, as specified in your config file. The index.php file (or whatever you have set as your site index_page in your config file) will be added to the URL, as will any URI segments you pass to the function, and the url_suffix as set in your config file.



If not working try with base_url






share|improve this answer


















  • 1





    echo the base_url or site_url <a href="<?=site_url("news")?>" > Back to Main </a>

    – asvignesh
    Jan 31 '13 at 10:16













3












3








3







Did u load url helper



Did u specify the site_url in config file...
->Returns your site URL, as specified in your config file. The index.php file (or whatever you have set as your site index_page in your config file) will be added to the URL, as will any URI segments you pass to the function, and the url_suffix as set in your config file.



If not working try with base_url






share|improve this answer













Did u load url helper



Did u specify the site_url in config file...
->Returns your site URL, as specified in your config file. The index.php file (or whatever you have set as your site index_page in your config file) will be added to the URL, as will any URI segments you pass to the function, and the url_suffix as set in your config file.



If not working try with base_url







share|improve this answer












share|improve this answer



share|improve this answer










answered Jan 31 '13 at 10:15









asvigneshasvignesh

4861425




4861425







  • 1





    echo the base_url or site_url <a href="<?=site_url("news")?>" > Back to Main </a>

    – asvignesh
    Jan 31 '13 at 10:16












  • 1





    echo the base_url or site_url <a href="<?=site_url("news")?>" > Back to Main </a>

    – asvignesh
    Jan 31 '13 at 10:16







1




1





echo the base_url or site_url <a href="<?=site_url("news")?>" > Back to Main </a>

– asvignesh
Jan 31 '13 at 10:16





echo the base_url or site_url <a href="<?=site_url("news")?>" > Back to Main </a>

– asvignesh
Jan 31 '13 at 10:16

















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f14623050%2fsite-url-is-not-work-properly-in-codeigniter-framework%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

1928 у кіно

Захаров Федір Захарович

Ель Греко