File Handling Concept PHP
File Handling Concepts in PHP Before going to file handling, you need to revise the Simple PHP programs, so click below this link to visit simple PHP programs, Simple PHP programs Part I Simple PHP programs Part II 1. To check that the sentence has Vowel, Alphabets and Words count using file concept <html> <head> <title>File Handling I</title> </head> <body> <center> <?php $file="ex1.txt"; $read=fopen($file,"a+"); $text=file_get_contents("ex1.txt"); $word = str_word_count($text); $length = strlen($text); $vowel = preg_replace("/[aeiou]/i", "", $text); $alpha = preg_replace("/[abcdefghijklmnopqrstuvwxyz]/i","",$text); $vowelcount=($length - strlen($vowel)); $alphacount=($length - strlen($alpha)); echo "<br>The vowels count in the passage is $vowelcount"; echo "<br...