0

我在寻找一种方法时遇到了一些问题。

我的网站上有一个名为 profile.php 的页面,该页面当前有一个页面标题为“用户个人资料”,我的 profile.php 页面如下所示:

<?php $page_title = "User Profile";
include('includes/headerframe.php'); ?>
<? // GET PROFILE ID FROM URL
if (isset ($_GET['id'])) {
    $profile_id = $_GET['id'];
}

$user_info_set = get_user_info();
if (!$user = mysql_fetch_array($user_info_set)) {
include ('includes/mod_profile/mod_noprofile.php');

}

else if (!isset($profile_id)) {
include("includes/mod_profile/mod_noprofile.php");

}

$profile_info_set = get_profile_info();
while ($profile = mysql_fetch_array($profile_info_set)) 

if (isset ($profile_id))
if ($user['account_status'] == "Active")
if ($user['account_type'] == "User") {
include("includes/mod_profile/mod_profile.php");

}

我基本上做的是使用profile.php作为包含页面来说明用户是否存在包含mod_profile,否则如果用户不存在include_modnoprofile。

所以在 mod_profile.php 中,我通过查询回显出用户的显示名称,并且我还想尝试将用户显示名称放在 profile.php 的页面标题中,而不是“用户”,

所以我的问题真的是,有没有办法从 mod_profile 中提取页面标题并将其设置为 profile.php 标题,或者我可以以某种方式在这部分代码中包含页面标题,我在 profile.php 中获取用户信息:

$profile_info_set = get_profile_info();
while ($profile = mysql_fetch_array($profile_info_set)) 

if (isset ($profile_id))
if ($user['account_status'] == "Active")
if ($user['account_type'] == "User") {
include("includes/mod_profile/mod_profile.php");

非常感谢任何人对此的帮助,在此先感谢

4

0 回答 0