-
PHP Sessions Test script
Add the following script to your test.php page and keep refreshing the page in browser, this will show you the working of session. The session variable "count" is getting incremented with each refresh.
Code:
<?php
session_start();
// Use $HTTP_SESSION_VARS with PHP 4.0.6 or less
if (!isset($_SESSION['count'])) {
$_SESSION['count'] = 0;
} else {
$_SESSION['count']++;
}
echo "Count: =$count";
?>
-
TEST CGI SCRIPT
#!/usr/bin/perl
print "Content-type: text/html\n\n";
print "This is a test file \n\n";
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks