calling a function problems

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jodi
Forum Newbie
Posts: 2
Joined: Mon Jun 29, 2009 7:17 am

calling a function problems

Post by jodi »

I am calling a function and it works okay in on most of my pages but they are in an includes folder, and it works.

I then have an index file on the root and go to call it using.

<?php sidebarlogin(); ?>

but the function is located in the includes/wordpress/ folder.

how do I link the two?
Eric!
DevNet Resident
Posts: 1146
Joined: Sun Jun 14, 2009 3:13 pm

Re: calling a function problems

Post by Eric! »

As long as your php file with the sidebarlogin function just contains functions you can use include without any extra code executing. Or you can just put that function in its own file and include it.

Code: Select all

include("/path/phpcode.php");
Last edited by Eric! on Mon Jun 29, 2009 8:30 am, edited 1 time in total.
jodi
Forum Newbie
Posts: 2
Joined: Mon Jun 29, 2009 7:17 am

Re: calling a function problems

Post by jodi »

thank you, going to have to do it as it own file I think as I call other links again in that folder.
Post Reply