Here is my class property
private $my_paths = array(
'imagemagick' => 'E:\Server\_ImageOptimize\ImageMagick',
'pngcrush' => 'E:\Server\_ImageOptimize\pngCrush\pngcrush.exe',
'jpegtran' => 'E:\Server\_ImageOptimize\jpegtran\jpegtran.exe',
'gifsicle' => 'E:\Server\_ImageOptimize\gifsicle\gifsicle.exe',
'pngquant' => 'E:\Server\_ImageOptimize\pngquant\pngquant.exe',
'pngout' => 'E:\Server\_ImageOptimize\pngout\pngout.exe'
);
There is a static method in the same class...
public static function is_image($file_path)
{
$imagemagick = $this->my_paths['imagemagick']. '\identify';
echo $imagemagick;
}
Of course this gives me errors like
Fatal error: Using $this when not in object context...
I then tried accessing the property like this self::my_paths['imagemagick']
but that did not help.
How should I handle this?