How do PHP MVC V and C bridge the bridge?

Updated on technology 2024-04-12
12 answers
  1. Anonymous users2024-02-07

    The clock is ticking.

    Sitting by the window, I often listen to *** sitting there and enjoying the passage of time alone. It's a rainy season, and how many inches of time can you enjoy watching the light raindrops rush from the sky to the earth? The rain in June always brings a lot of sadness, and it has been 13 years in these carefree days ......

    I have never felt so strongly that time is fleeting, and I live in carefree every day, and for the first time I think about the serious question of time passing. Is time really as many people say in a blink of an eye? We who have known the idiom "time is like an arrow, the sun and the moon are like a shuttle" since we were children, we really haven't thought about it deeply.

    After so many years, I began to appreciate the passage of time.

    Every moment, time passes quietly without us noticing. Whether it's the past or the present, what does time take away besides my time? However, leaving the footprints of my growth, happy and sad, always held in my hands, put in my heart, and deeply in my mind, the passage of time has made those memories clearer and more mellow.

    Perhaps, everyone has everyone's happiness and everyone's pain. Everyone walks on the same road, but has a different destination. Sitting in the classroom of the first (1) class of junior high school, the first (1) class of junior high school is like an intersection point, and we are 40 lines of different shapes in the space, and the fate of 500 years of cultivation allows us to meet and intersect.

    Here we are hastily numbered 1-40, hastily acquaintance, hurried smiling at each other; Then hurriedly say goodbye, hastily separate and go their separate ways, stretching into the unknown future.

    Keep walking, come to the end of your life, only to realize that time flies so fast. Everyone has time, but not everyone understands it. Some people waste their time; Some people cherish their time.

    He who wastes time does not understand the passage of time; On the contrary, a person who cherishes time, every day is a bit of time for him. Such a person lives a fulfilling life every day.

    Lying quietly in the beautiful rainy season, June, the season of dreams, time flies very fast, and time is full of the smell of parting. June will soon pass, and the rain of June is still dripping down on my fingertips and sliding into the unpredictable future.

  2. Anonymous users2024-02-06

    Yes, write all the logic in the model layer, let the post-c call it, put the data into the scope, pass it to v, and v to show it.

  3. Anonymous users2024-02-05

    MVC structures are supported by pre-developed frameworks, such as Zend Framework, ThinkPHP, etc., and you need to understand how this works in actual development, but you don't have to worry about who links to whom, because the framework has already taken care of this.

    Learning PHP and any development language is practice-oriented, generally speaking, the learning steps start with a completely self-written project, then get in touch with and understand the secondary development of PHP products such as PHPCMS, and finally get in touch with and understand the development framework. If the first step is not done well, you can jump directly to the framework development, which is basically a book from heaven.

  4. Anonymous users2024-02-04

    Model Layer This is used to handle the logic Layer C is the Colltroller layer, the controller layer, which is used to interact with the view page layer.

  5. Anonymous users2024-02-03

    The meaning of the three letters of MVC:

    m: model, which is responsible for database operations.

    v:view view, which is responsible for calling the model to retrieve the data, and then calling the template to show the final effect.

    c:controller, the entry point of the program, decides which view to call instead, and tells the view what to do.

    Here's a super simple MVC structure implementation:

    include '';

    include '';

    class controller

    public function doaction( $method = 'defaultmethod', $params = array() else if( method_exists($this, $method) )else

    public function link_page($name = '')

    public function defaultmethod()

    public function nonexisting_method()

    public function br()

    controller = new controller();

    controller->doaction('link_page', 'b');

    controller->doaction();

    class model

    if( in_array($name, array_keys( $this->database )

    public function getlinks()

    class view}

  6. Anonymous users2024-02-02

    It is recommended to use the Zend Framework.

    Regarding the ** above, it is possible to do so.

    1.Get the data you need to display.

    2.If necessary, convert the data read from the database into an array of views.

    sql="select * from foruma ";

    result=mysql_query($sql);

    num=mysql_num_rows($result);

    if($num>0)

    include view/

    foreach ($rows as $row) The above is just a personal opinion.

  7. Anonymous users2024-02-01

    Let's use a template. Frameworks are not necessary.

  8. Anonymous users2024-01-31

    PHP is a session mode, each page is a session, the so-called cross-page transfer is done through cookies, sessions.

  9. Anonymous users2024-01-30

    It has nothing to do with MVC, let's get to know the session.

  10. Anonymous users2024-01-29

    If you write like this, you have to include the relevant files of the whole system, whether you use it or not, and you should make what kind of files you need to load with what function. Write the files needed for the system to run into an array, for example:

    base_file = array(

    This array needs to be globally accessible, and then run the include $base file[ wherever your program runs'...']。

  11. Anonymous users2024-01-28

    By definition, you only implement V, you don't implement MCM is the model, and C is the controller.

    From your definition, include is the core program, which may be somewhat related to the model, but it may also be your tool class, which is not too clear in Chinese at the division level.

    lib is to get data, in the general MVC m or c can be used to get data, and the specific partition relationship is related, but will not specifically define one to get data, your definition of lib is similar to c.

    In general, the literal understanding is not too clear.

    If your include is the model and the lib is the controller, then your utility class or other functional interface actually needs to define a layer of relationships to show the relationship between mc and clearly.

  12. Anonymous users2024-01-27

    MVC is an abbreviation for three words: model, view, and controller). The purpose of the MVC model is to realize the division of functions of the web system.

    The model layer implements the business logic in the system, the view layer is used to interact with the user, the controller layer is the bridge between the model and the view, it can dispatch the user's requests and select the appropriate view for display, and it can also interpret the user's input and map them to the actions that the model layer can perform.

    Let's learn about the framework.

Related questions
8 answers2024-04-12

No, Ronaldo's strength is still a little stronger than Ronaldo, and his overall personal quality is a little better than Ronaldo, so the two of them are not players of the same level.

13 answers2024-04-12

There is no way to explain this kind of thing, it will only get darker and darker. >>>More

6 answers2024-04-12

3C is the compulsory certification of safety glass by the authorized unit of the China Certification and Accreditation Commission. >>>More

4 answers2024-04-12

c Management memory can be roughly understood as two types, one allocated on the stack and one allocated on the heap. >>>More

6 answers2024-04-12

Achilles tendonitis is aseptic inflammation of the Achilles tendon insertion or peritendon. In the early stage, patients may have local pain without oral antibiotics, because the disease is caused by aseptic inflammation, and some nonsteroidal anti-inflammatory drugs can be taken orally to reduce the local inflammatory reaction, as well as the patient's edema and pain symptoms. If oral medication is ineffective, you can choose to apply a topical application containing anti-inflammatory and analgesic drugs, such as the Achilles tendon prescription. >>>More