PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

How to handle search_template.html with PHP?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to handle search_template.html with PHP?

    It's worked well in our test site, but we use PHP on all our pages. When we place any PHP inside the search_template.html it gets ignored. Any tricks to making this work?

    While we can insert the form into a PHP without a hitch, as soon as you get the results, it seems to always use the search_template.html.

    I spent some time trying the Configure/Advanced/Embedding script option but it's not quite clear if this is the option to use. In that attempt I set that option to "http://www.MySite.com/search/index.php". I created the page "/search/index.php" that has all our PHP code and attempted to insert the search.php file at the location where we want it to appear, with a line:
    <?php include("search.php"); ?>
    But this didn't work at all (server error). They are both in the same directory. The help wasn't too clear on how this option is used, so I was just guessing it might be what's needed.

    P.S. Thanks for the search boxes FAQ! ((http://www.wrensoft.com/zoom/support/searchbox.html)

  • #2
    What you are after is answered in this FAQ:
    Q. How can I add server-side scripting (eg. PHP, ASP) to the search template?

    You were on the right track to try to include the search.php file within your own PHP script. The above FAQ gives more details, and perhaps you will find the virtual() function being more suitable. If you still have trouble, let us know.
    --Ray
    Wrensoft Web Software
    Sydney, Australia
    Zoom Search Engine

    Comment

    Working...
    X