How to see a folder of images with PHP if on my host I put all the permissions for the owner?

0

Hi, I was able to protect folders with hostinger by removing folder permissions. My idea is that both the images and the php files are not visible unless you use php code like the following, I want them to be visible only to clients and workers. for example

<img src="<?php if(isset($profile_picture)) echo $profile_picture; ?>" class="img img-rounded" heigth="60" width="60"/> 

This code works perfectly for me but disabling the permissions stops working: /

    
asked by Daniel Treviño 13.10.2017 в 23:54
source

1 answer

0

Do not do that, try this

RewriteEngine On

Create a .htaccess file and embed RewriteEngine On since when you block the permissions directly from the cpanel you also block that the php can read it.

    
answered by 14.10.2017 в 00:04