Fatal error: Call to undefined function site_url() 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!What's the difference between a method and a function?var functionName = function() vs function functionName() startsWith() and endsWith() functions in PHPSet a default parameter value for a JavaScript functionHow do I get PHP errors to display?What is the difference between call and apply?What does the exclamation mark do before the function?“Notice: Undefined variable”, “Notice: Undefined index”, and “Notice: Undefined offset” using PHPFatal error: Call to undefined function base_url() in C:wampwwwTest-CIapplicationviewslayout.php on line 5Why shouldn't I use mysql_* functions in PHP?
Are these square matrices always diagonalisable?
Do I need to protect SFP ports and optics from dust/contaminants? If so, how?
Trumpet valves, lengths, and pitch
Check if a string is entirely made of the same substring
Passing args from the bash script to the function in the script
"Whatever a Russian does, they end up making the Kalashnikov gun"? Are there any similar proverbs in English?
How to get even lighting when using flash for group photos near wall?
Multiple fireplaces in an apartment building?
Are all CP/M-80 implementations binary compatible?
Could moose/elk survive in the Amazon forest?
Israeli soda type drink
Second order approximation of the loss function (Deep learning book, 7.33)
Suing a Police Officer Instead of the Police Department
Align column where each cell has two decimals with siunitx
Split coins into combinations of different denominations
Why did C use the -> operator instead of reusing the . operator?
How long after the last departure shall the airport stay open for an emergency return?
How to avoid introduction cliches
What was Apollo 13's "Little Jolt" after MECO?
The art of proof summarizing. Are there known rules, or is it a purely common sense matter?
I preordered a game on my Xbox while on the home screen of my friend's account. Which of us owns the game?
How to open locks without disable device?
What is a 'Key' in computer science?
All ASCII characters with a given bit count
Fatal error: Call to undefined function site_url()
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!What's the difference between a method and a function?var functionName = function() vs function functionName() startsWith() and endsWith() functions in PHPSet a default parameter value for a JavaScript functionHow do I get PHP errors to display?What is the difference between call and apply?What does the exclamation mark do before the function?“Notice: Undefined variable”, “Notice: Undefined index”, and “Notice: Undefined offset” using PHPFatal error: Call to undefined function base_url() in C:wampwwwTest-CIapplicationviewslayout.php on line 5Why shouldn't I use mysql_* functions in PHP?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
I am using the CodeIgniter framework for PHP. I have created a view named "login.php". Once I
created the view, I then loaded the view inside of a function named "index" which is located
inside a class named "CCI" that extends the Controller but I keep receiving this error: Fatal
error: Call to undefined function site_url() in C:wampwwwFinalP_CCI_Clonesystem
applicationviewslogin.php on line 12. I don't understand the issue I an having because the
welcome page loads fine and my second function inside of the "CCI" class loads fine as well.
Here is some of the code:
Controller Files:
function CCI()
parent::Controller();
function index()
$this->load->view('login');
function test()
echo "Testing Data";
}
/* End of file login.php /
/ Location: ./system/application/controllers/cci.php */
class Welcome extends Controller
function Welcome()
parent::Controller();
function index()
$this->load->view('welcome_message');
function test()
echo "Testing Data";
/* End of file welcome.php /
/ Location: ./system/application/controllers/welcome.php */
php function codeigniter view controller
add a comment |
I am using the CodeIgniter framework for PHP. I have created a view named "login.php". Once I
created the view, I then loaded the view inside of a function named "index" which is located
inside a class named "CCI" that extends the Controller but I keep receiving this error: Fatal
error: Call to undefined function site_url() in C:wampwwwFinalP_CCI_Clonesystem
applicationviewslogin.php on line 12. I don't understand the issue I an having because the
welcome page loads fine and my second function inside of the "CCI" class loads fine as well.
Here is some of the code:
Controller Files:
function CCI()
parent::Controller();
function index()
$this->load->view('login');
function test()
echo "Testing Data";
}
/* End of file login.php /
/ Location: ./system/application/controllers/cci.php */
class Welcome extends Controller
function Welcome()
parent::Controller();
function index()
$this->load->view('welcome_message');
function test()
echo "Testing Data";
/* End of file welcome.php /
/ Location: ./system/application/controllers/welcome.php */
php function codeigniter view controller
1
Post more of your code, we can only guess what it could be at this point...
– Jakub
Dec 1 '10 at 3:15
add a comment |
I am using the CodeIgniter framework for PHP. I have created a view named "login.php". Once I
created the view, I then loaded the view inside of a function named "index" which is located
inside a class named "CCI" that extends the Controller but I keep receiving this error: Fatal
error: Call to undefined function site_url() in C:wampwwwFinalP_CCI_Clonesystem
applicationviewslogin.php on line 12. I don't understand the issue I an having because the
welcome page loads fine and my second function inside of the "CCI" class loads fine as well.
Here is some of the code:
Controller Files:
function CCI()
parent::Controller();
function index()
$this->load->view('login');
function test()
echo "Testing Data";
}
/* End of file login.php /
/ Location: ./system/application/controllers/cci.php */
class Welcome extends Controller
function Welcome()
parent::Controller();
function index()
$this->load->view('welcome_message');
function test()
echo "Testing Data";
/* End of file welcome.php /
/ Location: ./system/application/controllers/welcome.php */
php function codeigniter view controller
I am using the CodeIgniter framework for PHP. I have created a view named "login.php". Once I
created the view, I then loaded the view inside of a function named "index" which is located
inside a class named "CCI" that extends the Controller but I keep receiving this error: Fatal
error: Call to undefined function site_url() in C:wampwwwFinalP_CCI_Clonesystem
applicationviewslogin.php on line 12. I don't understand the issue I an having because the
welcome page loads fine and my second function inside of the "CCI" class loads fine as well.
Here is some of the code:
Controller Files:
function CCI()
parent::Controller();
function index()
$this->load->view('login');
function test()
echo "Testing Data";
}
/* End of file login.php /
/ Location: ./system/application/controllers/cci.php */
class Welcome extends Controller
function Welcome()
parent::Controller();
function index()
$this->load->view('welcome_message');
function test()
echo "Testing Data";
/* End of file welcome.php /
/ Location: ./system/application/controllers/welcome.php */
php function codeigniter view controller
php function codeigniter view controller
edited Dec 1 '10 at 3:41
student
asked Dec 1 '10 at 2:59
studentstudent
44135
44135
1
Post more of your code, we can only guess what it could be at this point...
– Jakub
Dec 1 '10 at 3:15
add a comment |
1
Post more of your code, we can only guess what it could be at this point...
– Jakub
Dec 1 '10 at 3:15
1
1
Post more of your code, we can only guess what it could be at this point...
– Jakub
Dec 1 '10 at 3:15
Post more of your code, we can only guess what it could be at this point...
– Jakub
Dec 1 '10 at 3:15
add a comment |
2 Answers
2
active
oldest
votes
You have to load the helper. The function site_url()
is provided by the url
helper, as described here.
$this->load->helper('url');
Thank You. Your help is really appreciated. Loading the helper function solved the issue.
– student
Dec 1 '10 at 3:59
6
student, you should accept netcoder's answer
– Thorpe Obazee
Dec 1 '10 at 11:01
add a comment |
You can try this:
First Load the URL Helper with:
$this->load->helper('url');
or set the following value inapplication/config/autoload.php
$autoload['helper'] = array('url');
- Then you can show the site url with:
base_url()
(result: http://example.com/) orsite_url()
(result: http://example.com/index.php/)
Note: Results depends on values stored in application/config/config.php
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f4320820%2ffatal-error-call-to-undefined-function-site-url%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
You have to load the helper. The function site_url()
is provided by the url
helper, as described here.
$this->load->helper('url');
Thank You. Your help is really appreciated. Loading the helper function solved the issue.
– student
Dec 1 '10 at 3:59
6
student, you should accept netcoder's answer
– Thorpe Obazee
Dec 1 '10 at 11:01
add a comment |
You have to load the helper. The function site_url()
is provided by the url
helper, as described here.
$this->load->helper('url');
Thank You. Your help is really appreciated. Loading the helper function solved the issue.
– student
Dec 1 '10 at 3:59
6
student, you should accept netcoder's answer
– Thorpe Obazee
Dec 1 '10 at 11:01
add a comment |
You have to load the helper. The function site_url()
is provided by the url
helper, as described here.
$this->load->helper('url');
You have to load the helper. The function site_url()
is provided by the url
helper, as described here.
$this->load->helper('url');
answered Dec 1 '10 at 3:40
netcodernetcoder
54.3k14104132
54.3k14104132
Thank You. Your help is really appreciated. Loading the helper function solved the issue.
– student
Dec 1 '10 at 3:59
6
student, you should accept netcoder's answer
– Thorpe Obazee
Dec 1 '10 at 11:01
add a comment |
Thank You. Your help is really appreciated. Loading the helper function solved the issue.
– student
Dec 1 '10 at 3:59
6
student, you should accept netcoder's answer
– Thorpe Obazee
Dec 1 '10 at 11:01
Thank You. Your help is really appreciated. Loading the helper function solved the issue.
– student
Dec 1 '10 at 3:59
Thank You. Your help is really appreciated. Loading the helper function solved the issue.
– student
Dec 1 '10 at 3:59
6
6
student, you should accept netcoder's answer
– Thorpe Obazee
Dec 1 '10 at 11:01
student, you should accept netcoder's answer
– Thorpe Obazee
Dec 1 '10 at 11:01
add a comment |
You can try this:
First Load the URL Helper with:
$this->load->helper('url');
or set the following value inapplication/config/autoload.php
$autoload['helper'] = array('url');
- Then you can show the site url with:
base_url()
(result: http://example.com/) orsite_url()
(result: http://example.com/index.php/)
Note: Results depends on values stored in application/config/config.php
add a comment |
You can try this:
First Load the URL Helper with:
$this->load->helper('url');
or set the following value inapplication/config/autoload.php
$autoload['helper'] = array('url');
- Then you can show the site url with:
base_url()
(result: http://example.com/) orsite_url()
(result: http://example.com/index.php/)
Note: Results depends on values stored in application/config/config.php
add a comment |
You can try this:
First Load the URL Helper with:
$this->load->helper('url');
or set the following value inapplication/config/autoload.php
$autoload['helper'] = array('url');
- Then you can show the site url with:
base_url()
(result: http://example.com/) orsite_url()
(result: http://example.com/index.php/)
Note: Results depends on values stored in application/config/config.php
You can try this:
First Load the URL Helper with:
$this->load->helper('url');
or set the following value inapplication/config/autoload.php
$autoload['helper'] = array('url');
- Then you can show the site url with:
base_url()
(result: http://example.com/) orsite_url()
(result: http://example.com/index.php/)
Note: Results depends on values stored in application/config/config.php
edited Mar 23 '18 at 17:35
fullstackpanda
32
32
answered May 8 '15 at 2:56
DharmanaDharmana
791210
791210
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f4320820%2ffatal-error-call-to-undefined-function-site-url%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
1
Post more of your code, we can only guess what it could be at this point...
– Jakub
Dec 1 '10 at 3:15