How can be ignored an <?php echo include 'subfolder/example.php'; ?>

In my document there is a PHP-integration outside of sc-content. The content of <?php echo include 'subfolder/example.php'; ?> is read completely by sitecake and causes sitecake not to work anymore. How can sitecake ignore this? On .scignore I listed subfolder/example.php.

If page is required inside document it shouldn’t be listed in .scignore. If you want to hide that specific section in edit mode best solution is to do it through javascript. Check how in docs under Using javascript section