PHP Taskbook Level 7.4

Задание 1

Given a text file, write the current time at the end of its text, starting with a new line.

Задание 2

Given a folder with files, get the names of all the images in this folder.

Задание 3

A text file is given. A form with input is given. A word is entered into the input. After sending the form, check whether the given word is in the file. Display the result in the browser.

Задание 4

The folder contains text files. Get the first N lines of text from each file and write the result to a new file, separating the resulting texts with empty lines.

Задание 5

Given a folder with files, write a program that will make all text files in this folder empty.

Задание 6

Form ul, in the points of which there will be days from the first to the last of the current month. The current day, as well as the weekend, are highlighted in other colors. Let the program save the obtained result in an HTML file.

Задание 7

Given an array containing file names, write a program that will create all files from the array in a given folder.

Задание 8

A form with an input is given. A number with an even number of digits is entered into it. After sending the form, check that the number is a lucky ticket, i.e. the sum of half the digits is equal to the sum of the other half of the digits.

Задание 9

Write a program that will generate the following array:

php[
  [1],
  [1, 2],
  [1, 2, 3],
  [1, 2, 3, 4, 5],
  [1, 2, 3, 4, 5, 6],
]