<legend id='MyGjo'><style id='MyGjo'><dir id='MyGjo'><q id='MyGjo'></q></dir></style></legend>
  • <small id='MyGjo'></small><noframes id='MyGjo'>

    1. <tfoot id='MyGjo'></tfoot>

          <bdo id='MyGjo'></bdo><ul id='MyGjo'></ul>
        <i id='MyGjo'><tr id='MyGjo'><dt id='MyGjo'><q id='MyGjo'><span id='MyGjo'><b id='MyGjo'><form id='MyGjo'><ins id='MyGjo'></ins><ul id='MyGjo'></ul><sub id='MyGjo'></sub></form><legend id='MyGjo'></legend><bdo id='MyGjo'><pre id='MyGjo'><center id='MyGjo'></center></pre></bdo></b><th id='MyGjo'></th></span></q></dt></tr></i><div id='MyGjo'><tfoot id='MyGjo'></tfoot><dl id='MyGjo'><fieldset id='MyGjo'></fieldset></dl></div>

        fgets() 和 fread() - 有什么区别?

        fgets() and fread() - What is the difference?(fgets() 和 fread() - 有什么区别?)

        <small id='uw5bF'></small><noframes id='uw5bF'>

          <tbody id='uw5bF'></tbody>
          <tfoot id='uw5bF'></tfoot>

          <legend id='uw5bF'><style id='uw5bF'><dir id='uw5bF'><q id='uw5bF'></q></dir></style></legend>
            • <bdo id='uw5bF'></bdo><ul id='uw5bF'></ul>

              1. <i id='uw5bF'><tr id='uw5bF'><dt id='uw5bF'><q id='uw5bF'><span id='uw5bF'><b id='uw5bF'><form id='uw5bF'><ins id='uw5bF'></ins><ul id='uw5bF'></ul><sub id='uw5bF'></sub></form><legend id='uw5bF'></legend><bdo id='uw5bF'><pre id='uw5bF'><center id='uw5bF'></center></pre></bdo></b><th id='uw5bF'></th></span></q></dt></tr></i><div id='uw5bF'><tfoot id='uw5bF'></tfoot><dl id='uw5bF'><fieldset id='uw5bF'></fieldset></dl></div>

                  本文介绍了fgets() 和 fread() - 有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我了解 fgets() 之间的区别fgetss() 但我不明白 之间的区别fgets()fread(),有人可以澄清一下这个主题吗?哪个更快?谢谢!

                  I understand the differences between fgets() and fgetss() but I don't get the difference between fgets() and fread(), can someone please clarify this subject? Which one is faster? Thanks!

                  推荐答案

                  fgets 读取一行——即它将在换行符处停止.

                  fgets reads a line -- i.e. it will stop at a newline.

                  fread 读取原始数据——它将在指定的(或默认)字节数后停止,独立于可能存在或不存在的任何换行符.

                  fread reads raw data -- it will stop after a specified (or default) number of bytes, independently of any newline that might or might not be present.


                  速度不是使用一个而不是另一个的理由,因为这两个功能只是不做同样的事情:


                  Speed is not a reason to use one over the other, as those two functions just don't do the same thing :

                  • 如果您想从文本文件中读取一行,请使用 fgets
                  • 如果您想从文件中读取一些数据(不一定是一行),请使用fread.

                  这篇关于fgets() 和 fread() - 有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Is Joomla 2.5 much faster than Joomla 1.5 Querywise(Joomla 2.5 比 Joomla 1.5 Querywise 快得多吗)
                  How to share Joomla login session from one joomla website to one ASP.Net MVC website(如何将 Joomla 登录会话从一个 joomla 网站共享到一个 ASP.Net MVC 网站)
                  htaccess redirect root to subdirectory but allow index.php in root AND query strings to function(htaccess 将根重定向到子目录,但允许根和查询字符串中的 index.php 起作用)
                  Joomla include database functions(Joomla 包含数据库功能)
                  nl2br() not working when displaying SQL results(显示 SQL 结果时 nl2br() 不起作用)
                  Joomla 2.5 JFactory::getSession(); seems to be caching in firefox(Joomla 2.5 JFactory::getSession();似乎在 Firefox 中缓存)
                  <tfoot id='ivrae'></tfoot>
                1. <small id='ivrae'></small><noframes id='ivrae'>

                      <bdo id='ivrae'></bdo><ul id='ivrae'></ul>
                        <tbody id='ivrae'></tbody>
                    • <legend id='ivrae'><style id='ivrae'><dir id='ivrae'><q id='ivrae'></q></dir></style></legend>
                        <i id='ivrae'><tr id='ivrae'><dt id='ivrae'><q id='ivrae'><span id='ivrae'><b id='ivrae'><form id='ivrae'><ins id='ivrae'></ins><ul id='ivrae'></ul><sub id='ivrae'></sub></form><legend id='ivrae'></legend><bdo id='ivrae'><pre id='ivrae'><center id='ivrae'></center></pre></bdo></b><th id='ivrae'></th></span></q></dt></tr></i><div id='ivrae'><tfoot id='ivrae'></tfoot><dl id='ivrae'><fieldset id='ivrae'></fieldset></dl></div>