<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>最优良人 &#187; 404</title>
	<atom:link href="http://www.zui88.com/view-tag/404/feed" rel="self" type="application/rss+xml" />
	<link>http://www.zui88.com/blog</link>
	<description>中山php&#124;最优网络</description>
	<lastBuildDate>Mon, 13 May 2013 04:56:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.4</generator>
		<item>
		<title>Fleaphp访问出错返回404页面的方法</title>
		<link>http://www.zui88.com/blog/view-33.html</link>
		<comments>http://www.zui88.com/blog/view-33.html#comments</comments>
		<pubDate>Sun, 07 Aug 2011 08:29:00 +0000</pubDate>
		<dc:creator>lin</dc:creator>
				<category><![CDATA[后端程序]]></category>
		<category><![CDATA[404]]></category>
		<category><![CDATA[fleaphp]]></category>

		<guid isPermaLink="false">http://www.zui88.com/blog/?p=33</guid>
		<description><![CDATA[配置文件里有项 ： 'dispatcherFailedCallback' , 他用来设置当调度器失败时调用的方法。 应用很灵活， 举个例子， 当控制器或控制器动作不存在就跳到定制的404页面。 FLEA::setAppInf('dispatcherFailedCallback', 'onDispatcherFailed'); function onDispatcherFailed { redirect('404.html'); } &#160; dispatcherFailedCallback的配置分2种情况，如果当前访问的控制器、动作不存：'dispatcherFailedCallback' =&#62; 'onDispatcherFailedCallback', 如果用户设置了RABC访问控制，访问无法访问的动作时：'dispatcherAuthFailedCallback' =&#62; 'onAuthFailedCallback', 上面onDispatcherFailedCallback、onAuthFailedCallback是出错的时候调用的函数，你可以在index.php种定义这2个函数就OK了。 例如： function onAuthFailedCallback($controller,$action) { redirect(url('Login','Index')); // 这里是验证失败时，让用户去登录 }]]></description>
			<content:encoded><![CDATA[<p>配置文件里有项 ： 'dispatcherFailedCallback' ,  他用来设置当调度器失败时调用的方法。<br />
应用很灵活， 举个例子， 当控制器或控制器动作不存在就跳到定制的404页面。</p>
<blockquote><p>FLEA::setAppInf('dispatcherFailedCallback', 'onDispatcherFailed');</p>
<p>function onDispatcherFailed</p>
<p>{</p>
<p>redirect('404.html');</p>
<p>}</p>
<p>&nbsp;</p>
<p>dispatcherFailedCallback的配置分2种情况，如果当前访问的控制器、动作不存：'dispatcherFailedCallback'  =&gt; 'onDispatcherFailedCallback',<br />
如果用户设置了RABC访问控制，访问无法访问的动作时：'dispatcherAuthFailedCallback' =&gt; 'onAuthFailedCallback',<br />
上面onDispatcherFailedCallback、onAuthFailedCallback是出错的时候调用的函数，你可以在index.php种定义这2个函数就OK了。<br />
例如：<br />
function onAuthFailedCallback($controller,$action)<br />
{</p>
<p>redirect(url('Login','Index'));   //   这里是验证失败时，让用户去登录<br />
}</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.zui88.com/blog/view-33.html/feed</wfw:commentRss>
		<slash:comments>414</slash:comments>
		</item>
	</channel>
</rss>
