doubomudichen0832 2017-10-29 20:38
浏览 145

PHP - file_get_contents()导致服务器达到进入流程限制

I have a file that is basically a hub for HTML code, which gets (using file_gets_contents) some .html files, and some .php files. No issue there, except theres a lot of this file_get_contents going around. It gets around 10 files in total and responds to the user, the issue is that only now its becoming an issue.

I have it doing this so spare time, kind of a super-global system, for example, all my css stylesheets that are used in all my common pages are put in a .html file and gotten using file_get_contents so I dont have to edit the same stuff in multiple pages.

Just its starting to hit the Entry Process limit (Currently 20) really easilly.

Is there something else I should be doing here instead of file_get_contents?

Example of what im doing:

<?php
//hid database stuff and the db functions
if(isset($_GET["hwid"]) && $_GET["hwid"] != "" && isset($_GET["n"]) && $_GET["n"] != "") {
    $hwid = str_replace(" ", "+", urldecode($_GET["hwid"]));
    $number = $_GET["n"];
    $query = countrows("SELECT hwid FROM hwid WHERE `hwid`.`hwid` = :hwid AND `hwid`.`banned` = 0", "snipcbar_authorization", array(":hwid"=>$hwid));
    if($query == $hwid) {
        echo "<!-- ".md5(md5("something".$hwid."-n-".$number."thatihavetoremove"))." -->";
        echo file_get_contents("MAIN.php");
    } else {
        echo file_get_contents("REDEEM.php");
    }
} else {
    echo file_get_contents("REDEEM.php");
}
?>

(The files im getting here, like main.php and redeem.php also have file_get_contents related lines).

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥100 set_link_state
    • ¥15 虚幻5 UE美术毛发渲染
    • ¥15 CVRP 图论 物流运输优化
    • ¥15 Tableau online 嵌入ppt失败
    • ¥100 支付宝网页转账系统不识别账号
    • ¥15 基于单片机的靶位控制系统
    • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
    • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
    • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
    • ¥15 手机接入宽带网线,如何释放宽带全部速度