{"id":336,"date":"2021-08-19T02:51:00","date_gmt":"2021-08-19T02:51:00","guid":{"rendered":"https:\/\/262235.xyz\/?p=336"},"modified":"2021-08-19T02:51:00","modified_gmt":"2021-08-19T02:51:00","slug":"336","status":"publish","type":"post","link":"https:\/\/lyvba.com\/index.php\/2021\/08\/19\/336\/","title":{"rendered":"PHP \u4e0b\u8f7d\u65f6\u95f4\u8ba1\u7b97\u5668 \u6e90\u7801"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/lyvba.com\/wp-content\/uploads\/2021\/08\/1336643898.jpg\" alt=\"time.jpg\" title=\"time.jpg\"><\/p>\n<h2>\u6f14\u793a\u7f51\u5740  <a href=\"https:\/\/lyvba.com\/gettime.php\">https:\/\/lyvba.com\/gettime.php<\/a><\/h2>\n<ul>\n<li>\u4e0b\u8f7d\u6e90\u7801\u4fdd\u5b58\u6587\u4ef6\u540d <code>gettime.php<\/code> \uff0c\u5982\u679c\u4fee\u6539\u6587\u4ef6\u540d <code>form action=<\/code> \u8981\u5bf9\u5e94\u4fee\u6539<\/li>\n<\/ul>\n<h2><code>gettime.php<\/code>  \u6e90\u7801<\/h2>\n<pre><code>&lt;html&gt;\n&lt;head&gt;\n&lt;meta charset=\"utf-8\"&gt;\n&lt;title&gt;\u4e0b\u8f7d\u65f6\u95f4\u8ba1\u7b97\u5668&lt;\/title&gt;\n&lt;\/head&gt;\n&lt;body style=\"text-align:center;\"&gt;\n&lt;a href=\"https:\/\/www.lyvba.com\/index.php\/archives\/336\/\"&gt;\n&lt;img src=\"https:\/\/lyvba.com\/wp-content\/uploads\/2021\/08\/1336643898.jpg\" &gt;\n&lt;\/a&gt;\n&lt;p&gt;&lt;p&gt;&lt;p&gt;\n&lt;form action=\"gettime.php\" method=\"get\"&gt;\n\u4e0b\u8f7d\u901f\u5ea6(KB\/s): &lt;input type=\"text\" name=\"speed\"&gt;\n\u6587\u4ef6\u5927\u5c0f(MB): &lt;input type=\"text\" name=\"size\"&gt;\n&lt;input type=\"submit\" value=\"\u5f00\u59cb\u8ba1\u7b97\"&gt;\n&lt;\/form&gt;\n &lt;?php\n $size = floatval($_GET[\"size\"]);\n $speed = floatval($_GET[\"speed\"]);\n\n $time =  intval($size * 1024 \/ $speed);\n if ($time &gt; 0){\n    echo  \"\u4e0b\u8f7d\u901f\u5ea6: \" .  $speed . \"(KB\/s)     \u6587\u4ef6\u5927\u5c0f: \" .  $size . \"(MB)&lt;br&gt;\";\n    echo  \"\u4e0b\u8f7d\u6240\u9700\u65f6\u95f4: \" . $time . \"\u79d2!&lt;br&gt;\";\n    echo  \"\u6362\u7b97\u65f6\u95f4: \". intval($time \/3600) . \"\u5c0f\u65f6\" . intval($time % 3600 \/ 60 + 0.5) . \"\u5206\u949f\";\n\n }\n ?&gt;\n&lt;\/body&gt;\n&lt;\/html&gt;\n<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/lyvba.com\/wp-content\/uploads\/2021\/08\/2147150959.jpg\" alt=\"web.jpg\" title=\"web.jpg\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6f14\u793a\u7f51\u5740 https:\/\/lyvba.com\/gettime.php \u4e0b\u8f7d\u6e90\u7801\u4fdd\u5b58\u6587\u4ef6\u540d getti [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[34],"class_list":["post-336","post","type-post","status-publish","format-standard","hentry","category-learn","tag-php"],"_links":{"self":[{"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/posts\/336","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/comments?post=336"}],"version-history":[{"count":0,"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/posts\/336\/revisions"}],"wp:attachment":[{"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/media?parent=336"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/categories?post=336"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/tags?post=336"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}