pk-fr / yakpro-po

YAK Pro - Php Obfuscator
http://www.php-obfuscator.com
Other
1.31k stars 368 forks source link

Config file setting now working as expected #122

Closed ocgltd closed 3 months ago

ocgltd commented 3 months ago

I would like to exclude a single file from being obfuscated (just copy the file as is to the destination directory). I have the setting below, and the path is right, but it's still being obfuscated. Why?

$conf->t_keep = ['/myproject/settings.php'];

I have also tried:

$conf->t_keep = array('/myproject/settings.php');

pk-fr commented 3 months ago

are you sure the path is right? /myproject/settings.php is at the root of the filesystem....

do you really want the leading / of the path ?

ocgltd commented 3 months ago

Yes, it's a full absolute path. I cut the file path and issued "ls /myproject/settings.php" and it found the file no problem.

Are entries for this setting relative to the source path?

Just a suggestion, provide an example config file with values in all settings (different from default).

pk-fr commented 3 months ago

I tested, and you are right, it does not work with absolute paths... yakpro-po explores subdirectories and filtes relatively to the project directory... try with $conf->t_keep = ['settings.php'];

ocgltd commented 3 months ago

Ok I will change to relative path. And I assume 'project directory' is synonymous with 'source directory', not directory with the cnf file is