• \n\n    \n        \n            

    Sorry..頁面沒有找到!<\/h1>\n            

    \n                似乎你所尋找的網(wǎng)頁已移動或丟失了。\n            

    或者也許你只是鍵入錯誤了一些東西。<\/p>\n            請不要擔心,這沒事。如果該資源對你很重要,請與管理員聯(lián)系。\n            <\/p>\n            

    \n                火星不太安全,我可以免費送你回地球\n            <\/p>\n        <\/div>\n        \n            <\/div>\n        <\/a>\n        \n            <\/div>\n        <\/a>\n    <\/div>\n<\/div>\n<\/body>\n<\/html><\/pre>

    php Chinese website, a lot of are free Yii introductory tutorial<\/a>, welcome to learn online! <\/p>"}

    亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

    Home PHP Framework YII How does yii return 404

    How does yii return 404

    Nov 09, 2019 am 10:00 AM
    404 yii return

    How does yii return 404

    1. First go to the frontend\config folder of the Yii framework. There is a main.php file in it. Open it for editing and modify the controller name and method name:

    How does yii return 404

    2. Then go to the controllers controller and add the error method in the controller code.

    How does yii return 404

    3. Finally, create your view on layer V (here is error.php):

    <?php
    use yii\helpers\Html;
    $this->title = $name;
    $this->context->layout = false; //不使用布局,或者改為自己所需要使用的布局
    ?>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=gbk" />
        <title>這個.. 頁面沒有找到!!!_SJ5D.COM</title>
        <style type="text/css">
            body{ margin:0; padding:0; background:#efefef; font-family:Georgia, Times, Verdana, Geneva, Arial, 
            Helvetica, sans-serif; }
            div#mother{ margin:0 auto; width:943px; height:572px; position:relative; }
            div#errorBox{ background: url(/404_bg.png) no-repeat top left;width:943px; height:572px;margin:auto;}
            div#errorText{ color:#39351e; padding:146px 0 0 446px }
            div#errorText p{ width:303px; font-size:14px; line-height:26px; }
            div.link{ /*background:#f90;*/ height:50px; width:145px; float:left; }
            div#home{ margin:20px 0 0 444px;}
            div#contact{ margin:20px 0 0 25px;}
            h1{ font-size:40px; margin-bottom:35px; }
        </style>
    </head>
    <body>
    <div id="mother">
        <div id="errorBox">
            <div id="errorText">
                <h1>Sorry..頁面沒有找到!</h1>
                <p>
                    似乎你所尋找的網(wǎng)頁已移動或丟失了。
                <p>或者也許你只是鍵入錯誤了一些東西。</p>
                請不要擔心,這沒事。如果該資源對你很重要,請與管理員聯(lián)系。
                </p>
                <p>
                    火星不太安全,我可以免費送你回地球
                </p>
            </div>
            <a href="http://www.baidu.com" title="返回SJ5D首頁">
                <div class="link" id="home"></div>
            </a>
            <a href="http://www.aliyun.com" title="聯(lián)系管理員">
                <div class="link" id="contact"></div>
            </a>
        </div>
    </div>
    </body>
    </html>

    php Chinese website, a lot of are free Yii introductory tutorial, welcome to learn online!

    The above is the detailed content of How does yii return 404. For more information, please follow other related articles on the PHP Chinese website!

    Statement of this Website
    The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

    Hot AI Tools

    Undress AI Tool

    Undress AI Tool

    Undress images for free

    Undresser.AI Undress

    Undresser.AI Undress

    AI-powered app for creating realistic nude photos

    AI Clothes Remover

    AI Clothes Remover

    Online AI tool for removing clothes from photos.

    Clothoff.io

    Clothoff.io

    AI clothes remover

    Video Face Swap

    Video Face Swap

    Swap faces in any video effortlessly with our completely free AI face swap tool!

    Hot Tools

    Notepad++7.3.1

    Notepad++7.3.1

    Easy-to-use and free code editor

    SublimeText3 Chinese version

    SublimeText3 Chinese version

    Chinese version, very easy to use

    Zend Studio 13.0.1

    Zend Studio 13.0.1

    Powerful PHP integrated development environment

    Dreamweaver CS6

    Dreamweaver CS6

    Visual web development tools

    SublimeText3 Mac version

    SublimeText3 Mac version

    God-level code editing software (SublimeText3)

    Hot Topics

    PHP Tutorial
    1488
    72
    PHP Tips: Quickly Implement Return to Previous Page Function PHP Tips: Quickly Implement Return to Previous Page Function Mar 09, 2024 am 08:21 AM

    PHP Tips: Quickly implement the function of returning to the previous page. In web development, we often encounter the need to implement the function of returning to the previous page. Such operations can improve the user experience and make it easier for users to navigate between web pages. In PHP, we can achieve this function through some simple code. This article will introduce how to quickly implement the function of returning to the previous page and provide specific PHP code examples. In PHP, we can use $_SERVER['HTTP_REFERER'] to get the URL of the previous page

    Yii2 vs Phalcon: Which framework is better for developing graphics rendering applications? Yii2 vs Phalcon: Which framework is better for developing graphics rendering applications? Jun 19, 2023 am 08:09 AM

    In the current information age, big data, artificial intelligence, cloud computing and other technologies have become the focus of major enterprises. Among these technologies, graphics card rendering technology, as a high-performance graphics processing technology, has received more and more attention. Graphics card rendering technology is widely used in game development, film and television special effects, engineering modeling and other fields. For developers, choosing a framework that suits their projects is a very important decision. Among current languages, PHP is a very dynamic language. Some excellent PHP frameworks such as Yii2, Ph

    Data query in Yii framework: access data efficiently Data query in Yii framework: access data efficiently Jun 21, 2023 am 11:22 AM

    The Yii framework is an open source PHP Web application framework that provides numerous tools and components to simplify the process of Web application development, of which data query is one of the important components. In the Yii framework, we can use SQL-like syntax to access the database to query and manipulate data efficiently. The query builder of the Yii framework mainly includes the following types: ActiveRecord query, QueryBuilder query, command query and original SQL query

    What results does MySQL return after inserting data? What results does MySQL return after inserting data? Mar 01, 2024 am 10:27 AM

    MySQL is a widely used relational database management system for storing and managing data. When we want to insert new data into a database table, we usually use the INSERT statement. In MySQL, when the INSERT statement is executed to successfully insert data, a result will be returned, which is the result of the insertion operation. In this article, we will discuss in detail the results returned by MySQL after inserting data and provide some specific code examples. 1. The result returned after inserting data is in MySQL. When successfully executed

    Symfony vs Yii2: Which framework is better for developing large-scale web applications? Symfony vs Yii2: Which framework is better for developing large-scale web applications? Jun 19, 2023 am 10:57 AM

    As the demand for web applications continues to grow, developers have more and more choices in choosing development frameworks. Symfony and Yii2 are two popular PHP frameworks. They both have powerful functions and performance, but when faced with the need to develop large-scale web applications, which framework is more suitable? Next we will conduct a comparative analysis of Symphony and Yii2 to help you make a better choice. Basic Overview Symphony is an open source web application framework written in PHP and is built on

    How to use PHP framework Yii to develop a highly available cloud backup system How to use PHP framework Yii to develop a highly available cloud backup system Jun 27, 2023 am 09:04 AM

    With the continuous development of cloud computing technology, data backup has become something that every enterprise must do. In this context, it is particularly important to develop a highly available cloud backup system. The PHP framework Yii is a powerful framework that can help developers quickly build high-performance web applications. The following will introduce how to use the Yii framework to develop a highly available cloud backup system. Designing the database model In the Yii framework, the database model is a very important part. Because the data backup system requires a lot of tables and relationships

    What is the difference between php framework laravel and yii What is the difference between php framework laravel and yii Apr 30, 2025 pm 02:24 PM

    The main differences between Laravel and Yii are design concepts, functional characteristics and usage scenarios. 1.Laravel focuses on the simplicity and pleasure of development, and provides rich functions such as EloquentORM and Artisan tools, suitable for rapid development and beginners. 2.Yii emphasizes performance and efficiency, is suitable for high-load applications, and provides efficient ActiveRecord and cache systems, but has a steep learning curve.

    How to open a 404 website How to open a 404 website Sep 11, 2023 pm 03:49 PM

    How to open a 404 website: 1. Choose a browser according to your preference; 2. You need to know the URL address of a 404 website, or search for "404 website list" or "random URL generator" in the search engine to find The addresses of some 404 websites; 3. Enter the address in the address bar of the browser, and then press the Enter key. The browser will try to connect to the address and return a 404 error page; 4. Before opening the 404 website, make sure The computer has the latest anti-virus software installed, and the browser's security settings are turned on.

    See all articles