
1:06
In this short French tutorial, the speaker walks through the initial steps of building a visitor counter using PHP object‑oriented programming. He creates a class named Counter, declares two essential attributes—`fp`, the file pointer for a text file that will store the count, and `nbr`, the numeric value read from that file. He then defines a constructor that, without requiring any arguments, opens the text file in read‑write mode, assigns the file handle to `fp`, and prepares to read and later update the stored visitor count. The explanation emphasizes the necessity of persisting the count in a file and setting up the class to manage that persistence.










