noumo / easyii

Easy yii2 cms powered by Yii framework 2
http://easyiicms.com
592 stars 270 forks source link

Images not loaded in localhost #182

Open gharach opened 8 years ago

gharach commented 8 years ago

after I installed easyiicms in localhost image did'nt show in any pages! image

but when I modified core image helper of yii framework in the BaseHtml.php file with these line all image loaded

public static function img($src, $options = []) { $options['src'] = Url::toRoate($src); if (!isset($options['alt'])) { $options['alt'] = ''; } return static::tag('img', '', $options); }

as you can see I change first line of function img and replace Url:to($scr) with Url::toRoate and images load correctly then . as changing yii core is not a good solution what should I do ??

mkrvevgn commented 8 years ago

This problem is already discribed and solution already exists

https://github.com/noumo/easyii/issues/133

gharach commented 8 years ago

yes , but I dont wanna change httpd.conf file , what should I do now?

JDL747 commented 8 years ago

It didn't worked even after changing the httpd.conf file !

The workaround is to change line 14 in vendor/noumo/easyii/helpers/Upload.php like so

public static $UPLOADS_DIR = '../{projectName}/uploads';

findinglx commented 7 years ago

@JDL747 Thank U

barakaPBM commented 7 years ago

@JDL747 This worked for me Thank you

JDL747 commented 7 years ago

@barakaPBM this CMS seems not to be maintained anymore, I recommend this one https://luya.io/

dzyof commented 7 years ago

$asset = \app\assets\AppAsset::register($this); Html::img($asset->baseUrl . '/images/pic_logo_ua.png', ['alt' => 'logo'])

izomi32 commented 6 years ago

thx ^_^