Welcome Guest, Not a member yet? Register   Sign In
Image not showing in codeigniter 4
#10

(This post was last modified: 11-07-2019, 12:34 AM by durairaj.)

(11-06-2019, 11:30 PM)John_Betong Wrote: Try this:
1. index.php -> echo $PATH = getcwd(); die;
2. make a note of the $PATH;
3. create this folder: $PATH .'\assets\avatar'
4. save this avatar file: $PATH .'\assets\avatar\avatar_1.jpg'
5. test: index.php -> echo '<img src="/assets/avatar/avatar_1.jpg" alt="#" width=333 height=333 >';

Edit:
If that does not work and the image file is saved in the correct path then there is most likely to be a problem with .htaccess file. If so temporarily rename .htaccess file and try again.

Also in index.php temporarily add these lines:
<?php
declare(strict_types=1);
error_reporting(-1);
ini_set('display_errors', '1');

echo '<img src="/assets/avatar/avatar_1.jpg" alt="#" width=333 height=333 >';
die;
thanks man ,i will try

(11-07-2019, 12:23 AM)durairaj Wrote:
(11-06-2019, 11:30 PM)John_Betong Wrote: Try this:
1. index.php -> echo $PATH = getcwd(); die;
2. make a note of the $PATH;
3. create this folder: $PATH .'\assets\avatar'
4. save this avatar file: $PATH .'\assets\avatar\avatar_1.jpg'
5. test: index.php -> echo '<img src="/assets/avatar/avatar_1.jpg" alt="#" width=333 height=333 >';

Edit:
If that does not work and the image file is saved in the correct path then there is most likely to be a problem with .htaccess file. If so temporarily rename .htaccess file and try again.

Also in index.php temporarily add these lines:
<?php
declare(strict_types=1);
error_reporting(-1);
ini_set('display_errors', '1');

echo '<img src="/assets/avatar/avatar_1.jpg" alt="#" width=333 height=333 >';
die;
thanks man ,i will try
thanks a lot. you helped me lot,no words to say thank you.it's working
Reply


Messages In This Thread
Image not showing in codeigniter 4 - by durairaj - 11-06-2019, 12:19 AM
RE: Image not showing in codeigniter 4 - by durairaj - 11-07-2019, 12:23 AM



Theme © iAndrew 2016 - Forum software by © MyBB