Search
 
SCRIPT & CODE EXAMPLE
 

PHP

fgets in php

    $fptr =  fopen('myfile.txt','r'); 
    if(!$fptr) 
    { 
        die("Could not open file"); 
    } 
    while($line = fgets($fptr)) 
    { 
        echo $line; //fgets read line by line, if we don't put code in while loop then it will print only one line of code
    } 
    echo "End of the file reached!";  //it only reads one line at a time 
Comment

PREVIOUS NEXT
Code Example
Php :: laravel module package 
Php :: Cambiar la imagen por defecto en producto WooCommerce 
Php :: how to get client ip address in php 
Php :: ci4 throw new exception 
Php :: laravel factory in custom namespace 
Php :: php header not working 
Php :: Syntax error or access violation: 1071 Specified key was too long; max key length 
Php :: php Program for Sum of the digits of a given number 
Php :: html in php function 
Php :: configuration laravel dompdf 
Php :: popular cms 
Php :: laravel optional params 
Php :: Getting the closest string match using php 
Php :: update cart subtotal woocommerce 
Php :: alias to change php version on ubuntu 
Php :: jquery is less than or equal to 
Php :: smarty switch case 
Php :: how to create resource controller in laravel 
Php :: wp_customize image 
Php :: new static laravel 
Php :: php <= 
Php :: Laravel - Send mail using mail class 
Php :: foreach sort orderby php 
Php :: use php artisan command through controller 
Php :: PHP $argv echo 
Php :: if statement in laravel blade 
Php :: downgrade php version 
Php :: laravel logout after password change 
Php :: php tutorial 
Php :: laravel phpunit not run test 
ADD CONTENT
Topic
Content
Source link
Name
7+4 =