<?php // smarty.php$path = $_SERVER['DOCUMENT_ROOT'];require "$path/Smarty/Smarty.class.php";$smarty = new Smarty();$smarty->template_dir = "$path/temp/smarty/templates";$smarty->compile_dir = "$path/temp/smarty/templates_c";$smarty->cache_dir = &quo Read More
<?php // formtest2.phpif (isset($_POST['name'])) $name = $_POST['name'];else $name = "(Not entered)";echo <<<_END<html> <head> <title>Form Test</title> </head> <body> Your name is: $name<br /> <form method="post& Read More
第十章<?php // login.php$db_hostname = 'localhost';$db_database = 'publications';$db_username = 'username';$db_password = 'password';?><?phprequire_once 'login.php';$db_server = mysql_connect($db_hostname, $db_username, $db_password);if (!$db_server) die Read More