<?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>Reading file Archives - scmGalaxy</title>
	<atom:link href="https://www.scmgalaxy.com/tutorials/tag/reading-file/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.scmgalaxy.com/tutorials/tag/reading-file/</link>
	<description>A Platform for Software Engineers</description>
	<lastBuildDate>Mon, 16 Aug 2021 11:57:29 +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 Reading file on File Handling in PHP</title>
		<link>https://www.scmgalaxy.com/tutorials/tutorial-for-reading-file-on-file-handling-in-php/</link>
					<comments>https://www.scmgalaxy.com/tutorials/tutorial-for-reading-file-on-file-handling-in-php/#respond</comments>
		
		<dc:creator><![CDATA[Ashwani Kumar]]></dc:creator>
		<pubDate>Fri, 13 Aug 2021 12:40:54 +0000</pubDate>
				<category><![CDATA[php]]></category>
		<category><![CDATA[File Handling]]></category>
		<category><![CDATA[File Handling in PHP]]></category>
		<category><![CDATA[How]]></category>
		<category><![CDATA[How many types of PHP file Read Functions are]]></category>
		<category><![CDATA[Php]]></category>
		<category><![CDATA[PHP readfile() Function]]></category>
		<category><![CDATA[php tutorial]]></category>
		<category><![CDATA[readfile()]]></category>
		<category><![CDATA[Reading file]]></category>
		<category><![CDATA[Reading file on File Handling]]></category>
		<category><![CDATA[types of PHP file Read Functions]]></category>
		<category><![CDATA[What]]></category>
		<category><![CDATA[What is Reading file on File Handling]]></category>
		<guid isPermaLink="false">https://www.scmgalaxy.com/tutorials/?p=7923</guid>

					<description><![CDATA[<p>What is Reading file on File Handling? PHP has a number of functions for reading data from files. You may [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/tutorial-for-reading-file-on-file-handling-in-php/">Tutorial for Reading file on File Handling in PHP</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 Reading file on File Handling?</h3>



<p class="wp-block-paragraph">PHP has a number of functions for reading data from files. You may read entire file data, read data line by line, or read data character by character using various methods.</p>



<h3 class="wp-block-heading">How many types of PHP file Read Functions are:-</h3>



<p class="wp-block-paragraph">The available PHP file read functions are given below.</p>



<ul class="wp-block-list"><li>fread()</li><li>fgets()</li><li>feof()</li></ul>



<h3 class="wp-block-heading">PHP readfile() Function</h3>



<p class="wp-block-paragraph">Reads a file and publishes it to the output buffer with the <code><span class="has-inline-color has-vivid-red-color"><strong>readfile()</strong></span></code> method.</p>



<p class="wp-block-paragraph">Assume we have a text file on the server named &#8220;webdictionary.txt&#8221; that looks like this:</p>



<pre class="wp-block-code"><code>AJAX = Asynchronous JavaScript and XML
CSS = Cascading Style Sheets
HTML = Hyper Text Markup Language
PHP = PHP Hypertext Preprocessor
SQL = Structured Query Language
SVG = Scalable Vector Graphics
XML = EXtensible Markup Language</code></pre>



<p class="wp-block-paragraph">The following is the PHP code for reading the file and writing it to the output buffer (the <code><span class="has-inline-color has-vivid-red-color"><strong>readfile() </strong></span></code>method returns the number of bytes read if successful):</p>



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



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



<p class="wp-block-paragraph">If all you want to do is open a file and read its contents, the <code><span class="has-inline-color has-vivid-red-color"><strong>readfile()</strong></span></code> method comes in handy.</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/tutorial-for-reading-file-on-file-handling-in-php/">Tutorial for Reading file on File Handling in PHP</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-reading-file-on-file-handling-in-php/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
