header

Collapse

Custom PHP

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Go to Thank You pogo
    Junior Member
    • 01.2021
    • 21
    • 1
    • 0

    Font Size
    #1

    Custom PHP

    Go to Thank You
    I am working to replace my php modules with the new template display module.

    I have a php file that when run, creates a search display page. Since this is part

    of a large library I am hoping to include files rather than create more large functions.

    I saw this method and it works, but it leaks all of the text out before the actual

    page displays. Is there a way to avoid this? Here is an example:



    public function fsc_search_display()

    {

    ob_start();

    include("fsc/modules/fsc_search.php");

    $output = ob_get_contents();

    return ['html' => $output];

    }

    I added this code to core/packages/localapi/api/main.php

    My template contains:

    {vb:data result, localapi:main, fsc_search_display}

    {vb:raw result.html}



    Does anybody know of a way to correct this problem?

    Thank you in advance,

    RIck

    Devami...Go to Top of Post
    Similar Threads
X

Thread Information

Collapse

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

    Those who read this thread

    Collapse

    Members who have read this thread: 1

    Related Topics

    Collapse

    Topics Statistics Last Post
    Started by vB-Info, 6 days ago
    0 responses
    2 views
    0 reactions
    Last Post vB-Info
    by vB-Info
    Started by vB-Info, 6 days ago
    0 responses
    1 view
    0 reactions
    Last Post vB-Info
    by vB-Info
    Started by vB-Info, 4 weeks ago
    0 responses
    21 views
    0 reactions
    Last Post vB-Info
    by vB-Info
    Working...
    😀
    😂
    🥰
    😘
    🤢
    😎
    😞
    😡
    👍
    👎

    AdBlock Detected

    Please Disable Adblock

    Please consider supporting us by disabling the ad blocker.

    I've Disabled AdBlock
    Home