CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Thread: function_exists functions cannot locate the function

  1. #1
    Join Date
    Mar 2004
    Posts
    339

    function_exists functions cannot locate the function

    I have a php page in /theme/default/sidebar.php and the do_calendar function is in /function/calendar/calendar.php

    I have written code
    Code:
    function_exists('do_calendar')
    in the side.php but it return false.

    I would like to know how to include the functions in calendar.php in sidebar.php?

    Thank you.

  2. #2
    PeejAvery's Avatar
    PeejAvery is offline Super Moderator Power Poster
    Join Date
    May 2002
    Posts
    10,943

    Re: function_exists functions cannot locate the function

    Are the two pages in some way reading from each other by one of the four following functions?

    include
    require
    include_once
    require_once
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

  3. #3
    Join Date
    Mar 2004
    Posts
    339

    Re: function_exists functions cannot locate the function

    i think it's the sidebar page that will read the calendar.php but not vice versa.

    Thank you.

  4. #4
    Join Date
    Mar 2004
    Posts
    339

    Re: function_exists functions cannot locate the function

    I have tried to use require_once, but then the whole section cannot be displayed....

  5. #5
    PeejAvery's Avatar
    PeejAvery is offline Super Moderator Power Poster
    Join Date
    May 2002
    Posts
    10,943

    Re: function_exists functions cannot locate the function

    So then in sidebar.php you must have one of those four functions. If nothing shows up then you are probably duplicating them and throwing PHP errors. Check your error.log file for PHP.

    Also, make sure you are calling function_exists after the include/require statement or else it will return false.
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)