Jump to content
Larry Ullman's Book Forums

matinee

Members
  • Posts

    6
  • Joined

  • Last visited

matinee's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Finally got it. changing the img src to "/yiiecom/images/ does the job <?php echo CHtml::link('<img src="/yiiecom/images/' . $data->id . '.jpg">', array('view', 'id'=>$data->id)); ?> Why I didn't get it before inspite of it having been explained by you <"Okay, good. I assume, then, that the URL you're using is http://localhost/yiiecom. If so, then the values for the img src attributes have to be /yiiecom/images. The default value of /images means the browser will look for the images in the "images" folder in the web root directory, C:\xampp\htdocs\images, in your case. Make that change and you should be good."> Thanks a lot Larry for your valuable help.
  2. thanks a lot Larry, now I get the images of the books. The problem is solved But, what should I do to keep the images folder inside the apllication folder. How I should modify the code in the "view.php" and "_view.php" to display the image when the images folder is inside the application folder.
  3. I am using localhost. C:\xampp\htdocs\yiiecom The images folder is at the application folder. C:\xampp\htdocs\yiiecom\images
  4. I was actually trying the chapter 23 example, e-commerce site the code is <?php echo '<img src="/images/'.$model->id.'.jpg">'; ?> It just display a broken picture. The image fails to display properly. The images are in the images folder Pliz help
  5. images of books fails to display properly in homepage, broken image is displayed instead. please solve the problem Home » Books Books Displaying 1-6 of 6 results. Title: The Yii Book Price: $20.00 Author: Larry Ullman Date Published: Dec. 31, 2024 Title: Effortless E-commerce with PHP and MySQL (2nd Edition) Price: $44.99 Author: Larry Ullman Date Published: Nov. 30, 2013 Title: PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (4th Edition) Price: $0.40 Author: Larry Ullman Date Published: Aug. 16, 2012
×
×
  • Create New...