1.
PHP- PHP. PHP , 䳺 Web- PHP. ( ) , . IIS CGI, FASTCGI ISAPI. , FASTCGI IIS CGI, .
, , -. , , , .
PHP - (c:\inetpub\wwwroot) test.php :
<html >
<head >
<title>Test PHP</title>
</head >
<body >
<?php phpinfo ()?>
</body >
</html >
, (http://localhost/test.php) PHP.
ϳ , php.ini. web-, PHP, php.ini , .
:
short_open_tag [on off] - <?...?>;
asp_tags [on off] - ASP (<% print "This is PHP code."; %>);
precision [integer] - , ;
safe_mode [on off] - ( PHP ). safe_mode CGI- PHP.
max_execution_time [integer] - PHP ( , );
error_reporting [1-8] - PHP ( , PHP , 1 , 2 , 4 , 8 - );
display_errors [on off] - .
2.
, , PHP :
include();
include_once();
require();
require_once().
, , . , PHP-, <?php.?>.
|
|
include (file) ' .
include_once(file) , include(), , . , .
require(file) , (, , ). Require_once(file) .
3.
PHP MYSQL. SQL-, SQL- - , '. , ' WEB- MySQL-. , - - (, phpMyAdmin).
, . ϳ ' , . . ', .
PHP . , .
resource mysql_connect ([string server [, string username [, string password]]]) ' .
bool mysql_close ([resource link_identifier]) ' .
bool mysql_select_db (string database_name [, resource link_identifier]) . resource mysql_query (string query) ( , SQL).array mysql_fetch_array (resource result) .