禁止访问数据库中的图像

时间:2015-06-05 08:51:15

标签: php apache symfony

我正在向应用发送图片的位置:http:\/\/192.168.0.193\/Symfony\/src\/OBCarsTest2Bundle\/Resources\/public\/images\/cars\/car2.jpg

她是我发送的json对象:

{"carInfo":
    {"name":"Mercedes",
     "model":"CLA-Class",
     "carvin":"ffgf",
     "price":"5556",
     "currency":"L.L",
     "id":2,
     "path":"http:\/\/192.168.0.193\/Symfony\/src\/OBCarsTest2Bundle\/Resources\/public\/images\/cars\/car2.jpg"}
}

但是收到错误:

Forbidden

You don't have permission to access /Symfony/src/OBCarsTest2Bundle/Resources/public/images/cars/car2.jpg
`on this server.`    
Apache/2.4.9 (Win64) PHP/5.5.12 Server at 192.168.0.193 Port 80

关于如何解决这个问题的任何想法?

有关详细信息,我使用symfony框架。

1 个答案:

答案 0 :(得分:2)

请将图片存储在不在web ..

内的bundle文件夹中