phpCAS
version 1.4.0
docs
examples
create_pgt_storage_db_table.php
Go to the documentation of this file.
1
<?php
2
23
// Load the settings from the central config file
24
require_once
'config.php'
;
25
// Load the CAS lib
26
require_once
$phpcas_path
.
'/CAS.php'
;
27
28
29
// Dummy client because we need a 'client' object
30
$client
=
new
CAS_Client
(
31
CAS_VERSION_2_0
,
true
,
$cas_host
,
$cas_port
,
$cas_context
,
false
32
);
33
34
// Set the torage object
35
$cas_obj
=
new
CAS_PGTStorage_Db
(
36
$client
,
$db
,
$db_user
,
$db_password
,
$db_table
,
$driver_options
37
);
38
$cas_obj
->init();
39
$cas_obj
->createTable();
40
?>
41
<html>
42
<head>
43
<title>
phpCAS
PGT db storage table creation</title>
44
<link rel=
"stylesheet"
type=
'text/css'
href=
'example.css'
/>
45
</head>
46
<body>
47
<div
class
=
"success"
>
48
<?php
49
echo
'Table <b>'
.
$db_table
.
'</b> successfully created in database <b>'
.
$db
.
'</b>'
;
50
?>
51
</div>
52
</body>
53
</html>
CAS_PGTStorage_Db
Definition:
Db.php:46
phpCAS
Definition:
CAS.php:281
$db_table
$db_table
Definition:
config.example.php:58
$phpcas_path
$phpcas_path
Definition:
config.example.php:20
$client
$client
Definition:
create_pgt_storage_db_table.php:30
$db
$db
Definition:
config.example.php:54
$driver_options
$driver_options
Definition:
config.example.php:59
CAS_VERSION_2_0
const CAS_VERSION_2_0
Definition:
CAS.php:78
$db_password
$db_password
Definition:
config.example.php:57
$db_user
$db_user
Definition:
config.example.php:56
$cas_host
$cas_host
Definition:
config.example.php:27
$cas_obj
$cas_obj
Definition:
create_pgt_storage_db_table.php:35
$cas_context
$cas_context
Definition:
config.example.php:30
CAS_Client
Definition:
Client.php:53
$cas_port
$cas_port
Definition:
config.example.php:33
Generated by
1.8.13