Answer the question
In order to leave comments, you need to log in
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
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question