![](/img/trans.png)
[英]Error 404 Unable to resolve the request in Yii (checked other solution but not work)
[英]Error 404 Unable to process request in Yii?
我有2个文件夹:
/ var / www / img / 2014 /(用于图像)
和
/ var / www / img / 2014 / th(用于缩略图)
例如,如果我从/ var / www / img / 2014 /加载图像: http : //url.com/img/2014/1400057171thinkpad10-lenovo,XY-435382-3.png所有正常加载。
但是,如果我从/ var / www / img / 2014 / th加载图像,则会显示错误:
错误404无法处理请求“ img / 2014 / th / 1400057171thinkpad10-lenovo,XY-435382-3.png”。
代码/var/www/protected/config/main.php
'urlManager' => array(
'urlFormat' => 'path',
'rules' => array(
'<controller:\w+>/<id:\d+>' => '<controller>/view',
'<controller:\w+>/<action:\w+>/<id:\d+>' => '<controller>/<action>',
'<controller:\w+>/<action:\w+>' => '<controller>/<action>',
),
//not show index.php
'showScriptName' => false,
),
文件夹权限775。我认为这与路由相关,不允许我进入“ th”,如何在Yii v1中修复此错误。 谢谢!
你没有给图片起一个合适的名字
每当您上传图像时,都必须替换图像名称作为时间戳。
主要问题是图片名称不正确。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.