����������
WEB - ������

www.spravkaweb.ru Rambler's Top100
 ï¿½ï¿½ ����������: �������/PHP/��������� �������.������� ��� �������������� ��������Ðàñïå÷àòàòü 
�������
�������
����� ���
HTML
JavaScript
VBScript
CSS
Flash
Perl
PHP
MySQL
SSI
VRML
�������������
������
Download
�����
��������
������
�������� ���
�����:
��������
Subscribe.Ru:

PHP

<--����� | ��������� � ������ | ������-->
��������� �������
������� ��� �������������� ��������
nl2br
�������� ������� �������� ������.

��������� :
string nl2br(string string)

�������� � ������ ��� ������� ����� ������ \n �� <br>\n � ���������� ���������. �������� ������ �� ����������. �������� �������� �� ��, ��� ������� \r, ������� ������������ � ����� ������ ��������� ������ Windows, ���� �������� ����� �� �����������, � ������ �������� �� ������ �����.

strip_tags
������� �� ������ ����.

��������� :
string strip_tags(string str [, string allowable_tags])

��� ������� ������� �� ������ ��� HTML- � PHP-���� � ���������� ���������.
������������� ��� ��������� ���� �������� ������.
� ��������� allowable_tags ����� �������� ����, ������� �� ������� ������� �� ������. ��� ������ ������������� �������� ���� � �����.
$st="
<b>������ �����</b>
<tt>���������� �����</tt>
<a href=https://spravkaweb.ru>������</a>";
echo "�������� �����: $st";
echo "<hr>����� �������� �����: ".striptags($st,"<a><b>").
     "<hr>";
�������� ���� ������, �� ������ ��������, ��� ���� <a> � <b> �� ���� ������� (����� ��� � �� ������ �����������), � �� ����� ��� <tt> �����.

get_meta_tags
������� ���� � ������������ ��� ���� <META>.

��������� :
array get_meta_tags(string filename, int use_include_path)

������� ��������� ���� � ���� � ��� ��� ���� <META> �� ��� ���, ���� �� ���������� ����������� ��� </head>.
���� ��������� ��� <META> ����� ���:
<meta name="��������" content="����������">
�� ���� ��������=>���������� ����������� � �������������� ������, ������� ��� ����� � ������������.
����������� � �������� �������� filename ���������� �� ���� ������������� "_", � ���������� ������� ������������� � ������ �������.
������� ������ ������������ ��� �������� ��������� ���� ��������� �� ���������� �����.
���� �������������� �������� use_include_path ����������, �� ����� ����� �������������� �� ������ � ������ ��������, �� � �� ���� ���, ������� ��������� ��� ������ ������������ include � require.

get_html_translation_table
������� ���������� ������� ����������, ������� ������������ ��������� htmlspecialchars() � htmlentities().

��������� :
string get_html_translation_table(int table [, int quote_style])

� ���� ������� �������� table ���������, ����� ������� ���������� ���������� ��������: HTML_SPECIALCHARS ��� ������� htmlspecialchars() ��� HTML_ENTITIES ��� ������� htmlentities(). �������� ��������������� ��������� quote_style ��������� � ������� htmlspecialchars().
$trans = get_html_translation_table(HTML_ENTITIES);
$str = "<A & B>";
$encoded = strtr($str, $strans);
// $encoded = "&amplt; A &amp; B &gt;"
������ ������ ������������ ������� array_flip() ��� ��������� ����������� ��������������.
$trans = array_flip($trans);
$original = strtr($encoded, $trans);

htmlspecialchars
���������� �������������� ������������ � HTML-�������������.


��������� :
string HtmlSpecialChars(string str [, int quote_style]);

�������� ���������� ���� ������� - �������������, ��� � ��������� ������ �� ���� ������� �� ����� ��������� ��� ���.
�������� � ������ ��������� ������� (����� ��� ���������, ������� � ����� "������" � "������") �� �� HTML-�����������,���, ����� ��� ��������� �� �������� "������ �����". ����� �������� ���������� ���� ������� - ������������ ��������� value � ��������� ��������� �����, ����� �� ���� ������� ������� � ���������, ��� �� ����� ��������� � �������� �����, ���� ��������� ���� ������������ ���������. ��� ������ ��������������� �������� quote_style ����� �������, ��� ������ � ���������:
  • ENT_COMPAT (�� ���������) - ��������� ���������� ������ ������� �������
  • ENT_QUOTES - ��������� ���������� ����� �������
  • ENT_NOQUOTES - ��������� ���������� ����� �������
    $str = htmlspecialchars("<a href=index.php>�������</a>", ENT_QUOTES);
    

  • htmlentities
    ���������� ����������� ��������, ������� HTML-�������������.


    ��������� :
    string htmlentities(string str [, int quote_style]);

    ��� ������� ������ �� htmlspecialchars(), �� ������ � ��� ������������� �� ���������� ����������, � ������ - ��� ���� ��������, ������� ����� ����� ������������� HTML-�������������.
    ��� ������ ��������������� �������� quote_style ����� �������, ��� ������ � ���������:
  • ENT_COMPAT (�� ���������) - ��������� ���������� ������ ������� �������
  • ENT_QUOTES - ��������� ���������� ����� �������
  • ENT_NOQUOTES - ��������� ���������� ����� �������

  • hebrev
    ����������� ����������� ������ Hebrew � ������������.

    ��������� :
    string hebrev(string hebrew_text [, int max_chars_per_line]);

    �������������� �������� max_chars_per_line ��������� ����� �������� �� ������ ������. ������� �������� �������� ������� �����.

    hebrevc
    ������ ������� hebrev � ������������ ���������.

    ��������� :
    string hebrevc(string hebrew_text [, int max_chars_per_line]);

    ������� hebrevc() ������ � hebrev() � ��� ��������, ��� ��� ����������� ������� �������� ����� "\n" � "<br>\n". �������������� �������� max_chars_per_line ��������� ����� �������� �� ������ ������. ������� �������� �������� ������� ����.

    quoted_printable_decode
    �������������� ������������ ������ � 8-������.

    ��������� :
    string quoted_printable_decode(string str);
    �� ���������� ����� ����� ������� "PHP 4. ����������� ����������."
    www.piter.com
    ������ / � ����������
     
    Download
    Ñêà÷àòü ñïðàâî÷íèê ïî PHP
    ��� ������:
    05.07.2004
  • � ������� PHP ��������� ��������� ������� ��� ������ � ���������� (���������� GD):
    imagetypes(), ...
  • � ������� JavaScript ��������� �������� �� ����� D, E, F, H, I
  • � ������� ������ ��������� ������, �������������� ��� �������� � html-�������� ��������� MS Office (Word, Excel � �.�.)
  • �����������:
    ��� ��� ������ ����� �� �������� � �����������:
    ��� ��������.
    ������ �� ��������.
    ���� ��������.
    �������� �������� �������.
    �� ��� ������� �������.
    � ����������� ���� ������.
    � ��� ��� �����.
    ������.
    ��������:
    Rambler's Top100
    Ñäåëàòü ñòðàíèöó ñòàðòîâîé ������� �������� ���������
    Äîáàâèòü ñòðàíèöó â èçáðàííîå �������� ���� � ���������
    Ñîîáùèòü îá íàéäåííîé îøèáêå �������� �� ������