<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>fread() Archives - scmGalaxy</title>
	<atom:link href="https://www.scmgalaxy.com/tutorials/tag/fread/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.scmgalaxy.com/tutorials/tag/fread/</link>
	<description>A Platform for Software Engineers</description>
	<lastBuildDate>Fri, 13 Aug 2021 13:24:06 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1</generator>
	<item>
		<title>Tutorial for fread() in Reading file</title>
		<link>https://www.scmgalaxy.com/tutorials/tutorial-for-fread-in-reading-file/</link>
					<comments>https://www.scmgalaxy.com/tutorials/tutorial-for-fread-in-reading-file/#respond</comments>
		
		<dc:creator><![CDATA[Ashwani Kumar]]></dc:creator>
		<pubDate>Fri, 13 Aug 2021 13:24:04 +0000</pubDate>
				<category><![CDATA[php]]></category>
		<category><![CDATA[File Handling in PHP]]></category>
		<category><![CDATA[fread()]]></category>
		<category><![CDATA[fread() function]]></category>
		<category><![CDATA[fread() function in php]]></category>
		<category><![CDATA[fread() in Reading file]]></category>
		<category><![CDATA[Php]]></category>
		<category><![CDATA[What]]></category>
		<guid isPermaLink="false">https://www.scmgalaxy.com/tutorials/?p=7932</guid>

					<description><![CDATA[<p>What is fread()? The file&#8217;s data is read using the PHP fread() function. Two parameters are required: file resource and [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/tutorial-for-fread-in-reading-file/">Tutorial for fread() in Reading file</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h3 class="wp-block-heading">What is fread()?</h3>



<p class="wp-block-paragraph">The file&#8217;s data is read using the PHP <code><span class="has-inline-color has-vivid-red-color"><strong>fread()</strong></span></code> function. Two parameters are required: file resource and file size.</p>



<h3 class="wp-block-heading">Read the File using <code>fread()</code></h3>



<p class="wp-block-paragraph">Using the <code><span class="has-inline-color has-vivid-red-color"><strong>fread()</strong></span></code> method, we may read content from an already open file. There are two parameters to the <code><span class="has-inline-color has-vivid-red-color"><strong>fread()</strong></span></code> function:</p>



<ul class="wp-block-list"><li>first is the <strong>filename</strong></li><li>and the second argument specifies the <strong>size in bytes</strong> for the content to be read.</li></ul>



<p class="wp-block-paragraph"><strong>Example:-</strong></p>



<p class="wp-block-paragraph">Let&#8217;s take an example, if we have a file <strong>studytonight.txt</strong> with following content:</p>



<pre class="wp-block-code"><code><span class="has-inline-color has-vivid-red-color">Studytonight is for coding enthusiasts!</span></code></pre>



<p class="wp-block-paragraph">If we wish to read the file&#8217;s complete content, we&#8217;ll open it in read mode and then use the  <code><span class="has-inline-color has-vivid-red-color"><strong>fread()</strong></span></code> method.</p>



<script src="https://gist.github.com/AdarshAshwani/b5fd6075109c4dcc02e0c2443a3a0259.js"></script>



<p class="wp-block-paragraph"><strong>Output:-</strong> </p>



<div class="wp-block-image"><figure class="aligncenter size-full"><img decoding="async" width="421" height="76" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/image-94.png" alt="" class="wp-image-7933" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/image-94.png 421w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/image-94-300x54.png 300w" sizes="(max-width: 421px) 100vw, 421px" /></figure></div>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/tutorial-for-fread-in-reading-file/">Tutorial for fread() in Reading file</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/tutorial-for-fread-in-reading-file/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
