Home > Backend Development > PHP Tutorial > html5 - The following statement is added to php and a blank page appears. Delete the page zhengchang

html5 - The following statement is added to php and a blank page appears. Delete the page zhengchang

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-08-18 09:16:13
Original
1595 people have browsed it

Add the following statement for a few days and the page will become blank, delete it normally
echo "isset($tireqty)".isset($tireqty)."
";
echo "isset($nothere)".isset( $nothere)."
";
echo "isset($tireqty)".empty($tireqty)."
";
echo "isset($nothere)".empty( $nothere)."
";

The complete code is listed below

<code>    <head>
            <title>Bob's Auto Parts -Order Result</title>
    </head>
    <body>
            <h1>Bos's Auto Parts</h1>
            <h2>Order Result</h2>

            <?php

                    define('TIREPRICE',100);
                    define('OILPRICE',10);
                    define('SPARKPRICE',4);
                    $tireqty  = $_POST['tireqty'];
                    $oilqty   = $_POST['oilqty'];
                    $sparkqty = $_POST['sparkqty'];
                    echo " <p>Order processed at".date('H:i, jS F Y')."</p>";
                    echo " <p>Your order is as follow:</p>";
                    echo $tireqty." tireqty<br/>";
                    echo $oilqty." oilqty<br/>";
                    echo $sparkqty." spark plugs <br/>";

                    $totalqty = 0;
                    $totalqty = $tireqty + $oilqty + $sparkqty;
                    echo "Items ordered: ".$totalqty."<br/>";
                    $totalamount = 0.00;
                    $totalamount = $tireqty * TIREPRICE + 
                    $oilqty * OILPRICE + $sparkqty * SPARKPRICE;

                    echo "Subtotal: $".number_format($totalamount,2)."<br/>";

                    $taxrate = 0.10;        //total sales tax is 10%
                    $totalamount = $totalamount * (1 + $taxrate);
                    echo "Total including tax: $".number_format($totalamount,2)."<br/>"</code>
Copy after login
Copy after login

// echo "isset($tireqty)".isset($tireqty)."
";
// echo "isset($nothere)".isset($nothere)."
";
// echo "isset($tireqty)".empty($tireqty)."
";
// echo "isset($nothere)".empty($nothere)."
";

<code>            ?>
    </body></code>
Copy after login
Copy after login

Reply content:

Add the following statement for a few days and the page will become blank, delete it normally
echo "isset($tireqty)".isset($tireqty)."
";
echo "isset($nothere)".isset( $nothere)."
";
echo "isset($tireqty)".empty($tireqty)."
";
echo "isset($nothere)".empty( $nothere)."
";

The complete code is listed below

<code>    <head>
            <title>Bob's Auto Parts -Order Result</title>
    </head>
    <body>
            <h1>Bos's Auto Parts</h1>
            <h2>Order Result</h2>

            <?php

                    define('TIREPRICE',100);
                    define('OILPRICE',10);
                    define('SPARKPRICE',4);
                    $tireqty  = $_POST['tireqty'];
                    $oilqty   = $_POST['oilqty'];
                    $sparkqty = $_POST['sparkqty'];
                    echo " <p>Order processed at".date('H:i, jS F Y')."</p>";
                    echo " <p>Your order is as follow:</p>";
                    echo $tireqty." tireqty<br/>";
                    echo $oilqty." oilqty<br/>";
                    echo $sparkqty." spark plugs <br/>";

                    $totalqty = 0;
                    $totalqty = $tireqty + $oilqty + $sparkqty;
                    echo "Items ordered: ".$totalqty."<br/>";
                    $totalamount = 0.00;
                    $totalamount = $tireqty * TIREPRICE + 
                    $oilqty * OILPRICE + $sparkqty * SPARKPRICE;

                    echo "Subtotal: $".number_format($totalamount,2)."<br/>";

                    $taxrate = 0.10;        //total sales tax is 10%
                    $totalamount = $totalamount * (1 + $taxrate);
                    echo "Total including tax: $".number_format($totalamount,2)."<br/>"</code>
Copy after login
Copy after login

// echo "isset($tireqty)".isset($tireqty)."
";
// echo "isset($nothere)".isset($nothere)."
";
// echo "isset($tireqty)".empty($tireqty)."
";
// echo "isset($nothere)".empty($nothere)."
";

<code>            ?>
    </body></code>
Copy after login
Copy after login

If the previous quote variable $nothere is not defined, an error will be reported. If you do not turn on the debug mode, the error will not be reported and will not be displayed.
isset and empty return bool types, so naturally they will not be displayed.

echo "isset($tireqty)"...If $tireqty is not defined, an error will occur, because the isset in double quotes here is output as a character

error_reporting(E_ALL);
ini_set("display_errors", 1);

Add to top of page

Related labels:
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
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template