set_magic_quotes_runtime

(PHP 4, PHP 5)

set_magic_quotes_runtime���õ�ǰ magic_quotes_runtime ����ѡ��ļ���״̬

Warning

This function was DEPRECATED in PHP 5.3.0, and REMOVED as of PHP 7.0.0.

˵��

set_magic_quotes_runtime ( bool $new_setting ) : bool

���õ�ǰ magic_quotes_runtime ����ѡ��ļ���״̬��

�����쳣

�� PHP 5.3 �𣬸ú����Ѿ������ã�ִ������ʱ����׳� E_DEPRECATED �쳣�� �� PHP 5.4 �𣬳��Կ��� magic quotes ʱ�ú��������һ�� E_CORE_ERROR ����

����

new_setting

�ر��� FALSE�������� TRUE��

����ֵ

�ɹ�ʱ���� TRUE�� ������ʧ��ʱ���� FALSE��

����

Example #1 set_magic_quotes_runtime() ����

<?php
// ������ʱ�ļ�ָ��
$fp tmpfile();

// д��һЩ����
fwrite($fp'\'PHP\' is a Recursive acronym');

// û�� magic_quotes_runtime
rewind($fp);
set_magic_quotes_runtime(false);

echo 
'Without magic_quotes_runtime: ' fread($fp64), PHP_EOL;

// �� magic_quotes_runtime
rewind($fp);
set_magic_quotes_runtime(true);

echo 
'With magic_quotes_runtime: ' fread($fp64), PHP_EOL;

// ����
fclose($fp);
?>

�������̻������

Without magic_quotes_runtime: 'PHP' is a Recursive acronym
With magic_quotes_runtime: \'PHP\' is a Recursive acronym

�μ�