0

Web サイトに PHPFox を使用しています。ユーザー ID 126 のユーザーのプロフィールを見たいとします。ユーザー名をクリックすると、次の URL がアドレス バーに表示されますhttp://34.144.60.142/profile-126/(user_id 126 の場合。他のユーザーの場合、プロファイル 244 のような別の番号が表示される場合があります)。ユーザー ID 244)。

上記の URL からは、プロファイル リクエストがどのように処理され、プロファイル データが取得されるかがまったくわかりません。

PHPFoxでルーティングがどのように行われるかを詳しく説明してください。

ありがとう。

4

2 に答える 2

0
on profile.index controller

system get user name by using this syntax

$mUser = $this->request()->get('req1');

now system fetch user data from user name by using predefine function.

$aRow = Phpfox::getService('user')->get($mUser, false);

this function exists in module/user/include/service/user.class.php service class.
于 2015-01-28T10:01:25.973 に答える
0
actually when we didn't allow user name in registration then phpfox automatically set a user name "profile-user_id" for eg : if any user have user_id 126 then it's username must be "profile-126" and it's unique.

when you visit any user profile page like 

http://34.144.60.142/profile-126/

http://34.144.60.142/profile-244/

so phpfox fetch data from that username and particular profile will display.
于 2015-01-28T07:14:39.733 に答える