List files from a directory or folder

Problem listing files from a directory

I am trying to list files in a directory I names jss by putting an index.php script in the same folder.
Unfortunately, I have not been able to succeed in doing this but got the error messages shared below after the main
Here is the error I got:
Warning : Undefined array key “submit digitallib/classnotes/jss/” in C:xampphtdocsdigitallibclassnotesjssindex.php on line 2

Warning : opendir(digitallib/classnotes/jss/): The system cannot find the path specifi (code: 3) in C:xampphtdocsdigitallibclassnotesjssindex.php on line 13

Warning : opendir(digitallib/classnotes/jss/): Failed to open directory: No such file or directory in C:xampphtdocsdigitallibclassnotesjssindex.php on line 13

Fatal error : Uncaught TypeError: readdir(): Argument #1 ($dir_handle) must be of type resource or null, bool given in C:xampphtdocsdigitallibclassnotesjssindex.php:15 Stack trace: #0 C:xampphtdocsdigitallibclassnotesjssindex.php(15): readdir(false) #1 {main} thrown in C:xampphtdocsdigitallibclassnotesjssindex.php on line 15

The code I used can be found here:
https://docs.google.com/document/d/1KPmxhN8Z7X6Y7xhqZYC7yDAGU_v-r4sUDcPMmnbSMdY/edit?usp=sharing