. .

PHP

» PHP 5 »

, , , . , . , .

. file_exists(). TRUE, , - FALSE ( 11.12).

11.12.

‹html›
‹head›
‹title› ‹/title›
‹/head›
‹body›
‹?php
//
if (file_exists ("info.txt"))
{
  echo " ";
}
else
{
  echo " ";
}
?›
‹/body›
‹/html›

, info.txt. is_file() - 11.13.

11.13.

‹html›
‹head›
‹title› ‹/title›
‹/head›
‹body›
‹?php
if (is_file ("info.txt"))
{
  echo " ";
}
else
{
  echo " ";
}
?›
‹/body›
‹/html›

, . , file.txt Web-cepepa. - . , is_writable() is_readable() ( 11.14).

11.14.

‹html›
‹head›
‹title› ‹/title›
‹/head›
‹body›
‹?php
//
if (is_writable ("info.txt"))
{
  echo " ";
}
else
{
  echo " ";
}
//
if (is_readable ("info.txt"))
{
  echo " ";
}
else
{
  echo " ";
}
‹/body›
‹/html›

is_writable() FALSE, is_readable() - TRUE.