mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 16:38:54 +00:00

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@338431 c90b9560-bf6c-de11-be94-00142212c4b1
129 lines
3.1 KiB
XML
129 lines
3.1 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<refentry xml:id="function.set-magic-quotes-runtime" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>set_magic_quotes_runtime</refname>
|
|
<refpurpose>Sets the current active configuration setting of magic_quotes_runtime</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsynopsisdiv>
|
|
&warn.deprecated.function-5-3-0.removed-7-0-0;
|
|
</refsynopsisdiv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>bool</type><methodname>set_magic_quotes_runtime</methodname>
|
|
<methodparam><type>bool</type><parameter>new_setting</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
Set the current active configuration setting of <link
|
|
linkend="ini.magic-quotes-runtime">magic_quotes_runtime</link>.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="errors"><!-- {{{ -->
|
|
&reftitle.errors;
|
|
<para>
|
|
Since PHP 5.3 this function has been deprecated and will raise an E_DEPRECATED warning upon execution.
|
|
Since PHP 5.4 this function will also raise an E_CORE_ERROR on trying to enable magic quotes.
|
|
</para>
|
|
</refsect1><!-- }}} -->
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>new_setting</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
&false; for off, &true; for on.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
&return.success;
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title><function>set_magic_quotes_runtime</function> example</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
// Create a temporary file pointer
|
|
$fp = tmpfile();
|
|
|
|
// Write some data to the pointer
|
|
fwrite($fp, '\'PHP\' is a Recursive acronym');
|
|
|
|
// Without magic_quotes_runtime
|
|
rewind($fp);
|
|
set_magic_quotes_runtime(false);
|
|
|
|
echo 'Without magic_quotes_runtime: ' . fread($fp, 64), PHP_EOL;
|
|
|
|
// With magic_quotes_runtime
|
|
rewind($fp);
|
|
set_magic_quotes_runtime(true);
|
|
|
|
echo 'With magic_quotes_runtime: ' . fread($fp, 64), PHP_EOL;
|
|
|
|
// Clean up
|
|
fclose($fp);
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
&example.outputs;
|
|
<screen>
|
|
<![CDATA[
|
|
Without magic_quotes_runtime: 'PHP' is a Recursive acronym
|
|
With magic_quotes_runtime: \'PHP\' is a Recursive acronym
|
|
]]>
|
|
</screen>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><function>get_magic_quotes_gpc</function></member>
|
|
<member><function>get_magic_quotes_runtime</function></member>
|
|
</simplelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
</refentry>
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|