Course : Internet and Web Programming Slot : L22+L23
Faculty : Dr. Jenila / Dr. Bharadwaj Marks : 30
Date:08/10/2020
Ex.11:
(1) Write a PHP program to perform the following file operations:
(i) Open a text file named sample.txt. If file not exists, your program should raise an error message and create a new file. (ii) Append the data “Hello! How are you?” to that file. (iii) Count and print the number of lines and paragraphs in that file. (iv) Count the number of words and print on a web page how many times the word appears in the file. (v) Upload the file to the any /temp directory. (2) Create your personal page using PHP, MySQLi and PDO