|
 |
|
เรื่องเวลาค่ะ MicroTime ค่ะ จากข้อมูลดังต่อไปนี้ หน้า A เริ่มโหลดหน้าเว็บ 0.37500300 1245851474 |
|
 |
|
|
 |
 |
|
<?php
$start = microtime(true);
// My source code here
$end = microtime(true);
echo $end."-".$start."=".($end - $start). " seconds";
?>
http://us.php.net/manual/en/function.microtime.php
ว่าง ๆ หัดอ่าน demo เล่นกันนะครับ
ที่มาตอบให้ กลัวไม่หล่อ อิอิ
|
 |
 |
 |
 |
Date :
2009-06-25 02:06:43 |
By :
deawx |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
สงสัยพี่เราจะเมางาน manual พี่ไม่ใช่ demo 
|
 |
 |
 |
 |
Date :
2009-06-25 02:21:03 |
By :
plakrim |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ถ้าทำแบบนี้มันไม่ได้ลบข้ามหน้าน่ะค่ะ
แต่มันลบในหน้าของตัวเอง
ต้องการที่จะลบข้ามหน้าค่ะ
ขอบคุณสำหรับคำแนะนำค่ะ
|
 |
 |
 |
 |
Date :
2009-06-25 08:28:54 |
By :
krataiss |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ทำแบบนี้มั๊งครับ
<?php
//a.php
session_start();
function getTime() {
$timer = explode( ' ', microtime() );
$timer = $timer[1] + $timer[0];
return $timer;
}
//a.php's process
echo '<br />a.php\'s process';
$_SESSION['a_end'] = getTime();
?>
<?php
//b.php
session_start();
function getTime() {
$timer = explode( ' ', microtime() );
$timer = $timer[1] + $timer[0];
return $timer;
}
if (!isset($_SESSION['a_end'])){
echo 'has not loaded a.php yet';
}else{
echo 'b_start - a_end = '.number_format((getTime()-$_SESSION['a_end']),8).' seconds';
}
//b.php's process
echo '<br />b.php\'s process';
?>
|
 |
 |
 |
 |
Date :
2009-06-25 09:38:13 |
By :
num |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ขอคำอธิบายหลักการทำงานหน่อยค่ะ...จะได้เข้าใจ
ขอบคุณมากนะค่ะ
|
 |
 |
 |
 |
Date :
2009-06-25 12:25:17 |
By :
krataiss |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
หลักการก็คือ ถ้ามีการลบข้ามหน้า ก็ใช้ session ร่วมด้วยซิครับผม
|
 |
 |
 |
 |
Date :
2009-10-06 16:03:14 |
By :
joekung |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 01
|