php - I cant include image in view file using yii framework -


I am new to the yii framework. I am trying to include the image file in the yii framework. See the file in the admin module But the image is in my root folder. My original folder is 'job explorers' image in the 'Pictures' folder inside the job finder folder. The name of the image is 'update.png'.

The name of my view file is list_jobseeker.php

I am including the image like this:

    

I got the error: htmlspecialchars () assumes that the parameter 1 should be a string,

The second parameter is the alt attribute of the IMG element. So your image should be similar to the code, including:

  & lt ;? Php echo CHtml :: image (Yii :: app () - & gt; request-> Basipult. / Images / update .png ',' update '); ? & Gt;   

If you want to make the image a link, then use it with the CHtml :: image:

  & lt; php $ img = CHtml :: image (Yii :: app () - & gt; Request- & gt; BaseUp. '/ Images / update.png', 'update'); Echo CHtml :: link ($ img, Yii :: app () - & gt; createUrl ('site / job_apply')); ? & Gt;    

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -