D
D
Dmitry2018-03-29 19:16:42
PHP
Dmitry, 2018-03-29 19:16:42

PHP. How to add a class (css) to an object selected by css class?

<?php
//checking for a file in the directory
$filename = $_SERVER['DOCUMENT_ROOT'].'/test/1.txt';
if (file_exists($filename)) {
//If the file exists, then the object with the class test needs to add the class Yes
} else {
//If the file does NOT exist, then the object with the class test needs to add the class No
}
?>
How to write it correctly ? ))) Could you strike a line of the finished code?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Kalombyr, 2018-03-29
@Kalombyr

Dig towards php.net/manual/ru/domdocument.loadhtmlfile.php

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question