CssToInlineStyles icon indicating copy to clipboard operation
CssToInlineStyles copied to clipboard

Class Error on first load

Open biroplane opened this issue 7 years ago • 4 comments

i was trying to use this awesome class, but i can't event start.

i've been trying installing via composer and thru direct requiring. none of them are working. it displays this error.

Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in /wwwdata/system/olanda/invoices/mailchimp/htmltomail/CssToInlineStyles.php on line 160

my file is just like this.

require('vendor/autoload.php');
require('src/CssToInlineStyles.php');

$CssToInlineStyles=new CssToInlineStyles();

biroplane avatar Sep 28 '17 07:09 biroplane

the latest version requires PHP 5.5+. The error you get looks like the one you would get when running the code with an older PHP version

stof avatar Sep 28 '17 08:09 stof

can i use an older version of CssToInlineStyles that works on PHP 5.4.45 thanks

biroplane avatar Sep 28 '17 08:09 biroplane

Fatal error: Uncaught Error: Class 'TijsVerkoyen\CssToInlineStyles\CssToInlineStyles' not found in....

my file code is :-

convert( $html, $css );

dg-web avatar Jan 23 '18 07:01 dg-web

please help me

dg-web avatar Jan 23 '18 07:01 dg-web