• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
fatal error - SOLVED

#1
[eluser]jvittetoe[/eluser]
Fatal error: Call to undefined function: anchor() in /home/suited84/public_html/pr0jects/myFi/system/application/views/home_v.php on line 13

i have decided to build my app on my website instead of locally. when i try to load home page im givin this error.

home_v.php

Code:
<li>&lt;?php echo anchor('home', 'Home'); ?&gt;</li>

#2
[eluser]marcoss[/eluser]
[quote author="jvittetoe" date="1182748641"]
Code:
<li>&lt;?php echo anchor('home', 'Home'); ?&gt;</li>
[/quote]

You did load the url helper, right?

Code:
$this->load->helper('url');

#3
[eluser]jvittetoe[/eluser]
looks as though my host hasnt upgraded to php5,

i had
Code:
function __construct(){
    
        parent::Controller();        
        $this->load->helper( array('url', 'form') );
    }

instead of

Code:
function Home(){
    
        parent::Controller();        
        $this->load->helper( array('url', 'form') );
    }

#4
[eluser]marcoss[/eluser]
So that was the problem. Anyway, CI has full support for PHP4 Wink

#5
[eluser]jvittetoe[/eluser]
well it just kinda postponed the issue. my host, asmallorange.com has told me to add the following line to my .htaccess t parse php files as php5

Code:
AddType application/x-httpd-php5 .php .inc .php5

but that hasnt fixed anything. actually returns a 404. should i add that line to my root .htaccess or the .htaccess in my projects root.

www.joshyboy.net/.htaccess

or

www.joshyboy.net/pr0jects/myFi/.htaccess

none the less, i think im just going to go full php4.

#6
[eluser]marcoss[/eluser]
Maybe PHP is running as a cgi, you can try:

Code:
AddType php5-cgi .php

But don't worry, PHP4 will do just fine, just use the old constructor call and use var instead of public,private,etc.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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