Notepad++ won't recognise opendir, readdir, fgets or feof?

[php] <?php
$dir = opendir(‘files’);
while(false !== ($file = readdir($dir))){
while (!feof($file)) {
$name = fgets($file, 1024);

?>[/php]

In Notepad++ it isn’t recognising any of those functions, what am I doing wrong?

You are using Notepad++. Look into using a real IDE :slight_smile:

What do you mean? What is it supposed to recognize?

Go to Settings > Style Configurator and select Language: PHP and Style: WORD, then add them under User-defined keywords. Notepad++ is a notepad with some scripting features, not a PHP editor.

Sponsor our Newsletter | Privacy Policy | Terms of Service