我在第一页尝试此代码
template<typename T>
class FooOwner {
private:
Foo<T>* p; // This can point to a object of type Foo<U>
// where U is a subclass of T
};
// NOTE: Foo<Derived> is always a subclass of Foo<Base>
template<typename T>
class Foo {
private:
template<typename U> // Constrain U to be a superclass of T?
friend class FooOwner;
};
和第二页中的此代码
$time_start = microtime(true);
$_SESSION['varname'] = $time_start;
但变量$ time_start未知 如何计算不同页面上的时间处理?
答案 0 :(得分:0)
试试这个..
<强> test1.php 强>
session_start();
$time_start = microtime(true);
$_SESSION['varname'] = $time_start;
<强> test2.php 强>
session_start();
$time_start = $_SESSION['varname'];
$time_end = microtime(true);
$time = $time_end - $time_start;
echo 'Execution time : ' . $time . ' seconds';
<强>输出:强> 执行时间:77.626733064651秒