_php example of Baidu search prompt function based on jQueryUI and Corethink

Source: Internet
Author: User

First to show you the effect of the picture:

Directory:

This is in the form of a corethink module, just to install the access

Index.php?s=/test/index

1. Build the module catalogue, write the overall document of the module

OPENCMF. Php

<?php return
Array (
//module Info
' info ' => array (
' name ' => ' Test ',
' title ' => ' Test
'), ' Icon ' => ' FA fa-newspaper-o ',
' icon_color ' => ' #9933FF ',
' description ' => ' Test ',
' developer ' = > ' Pangpython ',
' website ' => ' http://blog.csdn.net/u012995856/',
' version ' => ' 1.3.0 ',
' Dependences ' => Array (
' Admin ' => ' 1.3.0 ',
)
),
//User Center navigation
' User_nav ' => Array (
),
//module configuration
' config ' => array (
),
//Background menu and Permissions node configuration
' Admin_menu ' => Array (
' 1 ' => Array (
' id ' => ' 1 ',
' pid ' => ' 0 ',
' title ' => ' Test ',
' icon ' => ' FA fa-newspaper-o ' ,
),
' 2 ' => array (
' pid ' => ' 1 ', '
title ' => ' Content management ',
' icon ' => ' FA Fa-folder-open-o ',
),
)
);

2. Write Controller

Indexcontroller

<?php
namespace Test\controller;
Use Think\controller;
Use Home\controller\homecontroller;
/**
*
*
/class Indexcontroller extends homecontroller{public
function Index ()
{
$this- >display ();
}
Public Function MyData ($keyword) {
if ($keyword ==11) {
echo ' [' Pangpython ', ' HelloWorld '] ';
} else{
echo ' [ActionScript],
' AppleScript ',
' Asp ',
' BASIC ',
' C ', ' C
+ +
', ' Clojure ",
COBOL",
"ColdFusion",
"Erlang",
"Fortran",
"Groovy",
"Haskell",
"Java",
"JavaScript",
"Lisp,"
"Perl,"
"PHP,"
"Python,"
"Ruby,"
"Scala,"
"Scheme"] ';}}}

3. Write the front desk file

Index.html

 <! DOCTYPE html>  
 

The above is a small series to introduce the implementation of Baidu based on jQueryUI and Corethink search hint function, to achieve a simulated background data login effect, I hope to help you, if you have any questions please give me a message, small series will promptly reply to everyone. Here also thank you very much for the cloud Habitat Community website support!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.