【问题标题】:Severity: Warning --> fopen(./upload/ &lt;table cellspacing=&quot;0&quot;严重性:警告 --> fopen(./upload/ <table cellspacing="0"
【发布时间】:2017-02-27 07:12:50
【问题描述】:

我在我的一个应用程序中使用文件读取功能。

有时我在打开和关闭文件时遇到异常,因为在文件名中我得到的是 HTML 字符串,我需要做些什么来保护应用程序或识别这不是正确的名称?

这是完整的堆栈错误。

错误 - 2017-02-27 06:28:21 --> 严重性:警告 --> fopen(./upload/

<table cellspacing="0" cellpadding="0" width="100%">
  <tbody>
  <tr>
    <td class="titleBorderx" width="30">
      <table height="25" cellspacing="2" cellpadding="0" width="25" bgcolor="black">
        <tbody>
        <tr>
          <td id="L_default_x" class="x" valign="middle" align="center">X</td>
        </tr>
        </tbody>
      </table>
    </td>
    <td class="titleBorder" id="L_default_2">Network Access Message:<span class="TitleDescription"> The page cannot be displayed</span> </td>
  </tr>
  </tbody>
</table>

<table id="spacer">
  <tbody>
  <tr>
    <td height="10"></td></tr></tbody></table>
<table width="400">
  <tbody>
  <tr>
    <td nowrap="" width="25"></td>
    <td width="400"><span class="explain"><id id="L_default_3"><b>Explanation:</b></id></span><id id="L_default_4"> There is a problem with the page you are trying to reach and it cannot be displayed. </id><br><br>
    <b><span class="tryThings"><id id="L_default_5"><b>Try the following:</b></id></span></b> 
      <ul class="TryList">
        <li id="L_default_6"><b>Refresh page:</b> Search for the page again by clicking the Refresh button. The timeout may have occurred due to Internet congestion.
</li><li id="L_default_7"><b>Check spelling:</b> Check that you typed the Web page address correctly. The address may have been mistyped.
</li><li id="L_default_8"><b>Access from a link:</b> If there is a link to the page you are looking for, try accessing the page from that link.

      </li></ul>
<id id="L_default_9">If you are still not able to view the requested page, try contacting your administrator or Helpdesk.</id> <br><br>
    </td>
  </tr>
  </tbody>
</table>

<table id="spacer"><tbody><tr><td height="15"></td></tr></tbody></table>

<table width="400">
  <tbody>
  <tr>
    <td nowrap="" width="25"></td>
    <td width="400" id="L_default_10"><b>Technical Information (for support personnel)</b> 
      <ul class="adminList">
        <li id="L_default_11">Error Code: 502 Proxy Error. The request was rejected by the HTTP filter. Contact your Forefront TMG administrator. (12217)
</li><li id="L_default_12">IP Address: 10.40.0.20
</li><li id="L_default_13">Date: 2/27/2017 6:28:21 AM [GMT]
</li><li id="L_default_14">Server: SYS2019.netsolpk.com
</li><li id="L_default_15">Source: web filter

      </li></ul>
    </td>
  </tr>
  </tbody>
</table>

):打开流失败:文件名太长/srv/users/serverpilot/apps/php/public/application/controllers/Readfile.php 159

【问题讨论】:

  • 我正在使用php的CodeIgniter框架。
  • 我将所有&amp;lt;&amp;gt;&amp;quot; 从您收到的错误中更改...为了便于阅读。

标签: php codeigniter filenames


【解决方案1】:

您的fopen 函数中的字符串太长。而且我也认为这是无效的。您正在./upload/ 中查找名称为:

的文件

&amp;lt;table cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;0&amp;quot...

名称太长且无效。我认为您将变量传递给fopen 函数,变量的内容不正确。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-12-04
    • 1970-01-01
    • 2014-02-17
    • 2017-06-01
    • 2020-07-11
    • 1970-01-01
    • 2012-06-26
    相关资源
    最近更新 更多