cvs: phpdoc /en/language constants.xml /en/reference/apc/functions apc-delete.xml /en/reference/filesystem/functions is-uploaded-file.xml
/en/reference/pdo_mysql constants.xml /en/reference/pgsql/functions pg-escape-bytea.xml pg-escape-string.xml /en/reference/runkit sandbox-parent.xml
/en/reference/sdo reference.xml /en/reference/sdo_das_xml reference.xml
| From: | Jakub Vrana | Date: | Fri, 18 Nov 2005 16:25:24 +0000 |
| Subject: | cvs: phpdoc /en/language constants.xml /en/reference/apc/functions apc-delete.xml /en/reference/filesystem/functions is-uploaded-file.xml /en/reference/pdo_mysql constants.xml /en/reference/pgsql/functions pg-escape-bytea.xml pg-escape-string.xml /en/reference/runkit sandbox-parent.xml /en/reference/sdo reference.xml /en/reference/sdo_das_xml reference.xml |
||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969370921@lists.php.net to get a copy of this message | ||
vrana Fri Nov 18 11:25:24 2005 EDT
Modified files:
/phpdoc/en/reference/sdo reference.xml
/phpdoc/en/reference/sdo_das_xml reference.xml
/phpdoc/en/reference/runkit sandbox-parent.xml
/phpdoc/en/reference/pdo_mysql constants.xml
/phpdoc/en/language constants.xml
/phpdoc/en/reference/apc/functions apc-delete.xml
/phpdoc/en/reference/pgsql/functions pg-escape-bytea.xml
pg-escape-string.xml
/phpdoc/en/reference/filesystem/functions is-uploaded-file.xml
Log:
PHP examples syntax errors
http://cvs.php.net/diff.php/phpdoc/en/reference/sdo/reference.xml?r1=1.16&r2=1.17&ty=u Index: phpdoc/en/reference/sdo/reference.xml diff -u phpdoc/en/reference/sdo/reference.xml:1.16 phpdoc/en/reference/sdo/reference.xml:1.17 --- phpdoc/en/reference/sdo/reference.xml:1.16 Fri Oct 7 08:26:25 2005 +++ phpdoc/en/reference/sdo/reference.xml Fri Nov 18 11:25:22 2005 @@ -1,5 +1,5 @@ <?xml version='1.0' encoding='iso-8859-1'?> -<!-- $Revision: 1.16 $ --> +<!-- $Revision: 1.17 $ --> <!-- Purpose: database.abstract --> <!-- Membership: pecl --> <!-- State: experimental --> @@ -528,7 +528,7 @@ <![CDATA[ <?php foreach ($company as $name => $value) { - ... + // ... } ?> ]]> @@ -556,7 +556,7 @@ <![CDATA[ <?php foreach ($company->departments as $department) { - ... + // ... } ?> ]]> @@ -922,7 +922,7 @@ <![CDATA[ <?php foreach ($letter->getSequence() as $value) { - ... + // ... } ?> ]]> @@ -1015,7 +1015,7 @@ <programlisting role="php" id="sdo.examples.seqremove"> <![CDATA[ <?php - if (isset($letter_seq[0]) { + if (isset($letter_seq[0])) { unset($letter_seq[0]); } ?> http://cvs.php.net/diff.php/phpdoc/en/reference/sdo_das_xml/reference.xml?r1=1.11&r2=1.12&ty=u Index: phpdoc/en/reference/sdo_das_xml/reference.xml diff -u phpdoc/en/reference/sdo_das_xml/reference.xml:1.11 phpdoc/en/reference/sdo_das_xml/reference.xml:1.12 --- phpdoc/en/reference/sdo_das_xml/reference.xml:1.11 Fri Oct 7 05:43:24 2005 +++ phpdoc/en/reference/sdo_das_xml/reference.xml Fri Nov 18 11:25:22 2005 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.11 $ --> +<!-- $Revision: 1.12 $ --> <!-- Purpose: xml --> <!-- Membership: pecl --> <!-- State: experimental --> @@ -738,8 +738,7 @@ $emp1->manager = FALSE; $dept2 = $do->createDataObject("departments"); $emp2 = $dept2->createDataObject("employees"); -$emp2->n -ame = "Neil"; +$emp2->name = "Neil"; $emp2->manager = TRUE; print($xmldas->saveDataObjectToString($do, "companyNS", "CompanyType")); var_dump($do); http://cvs.php.net/diff.php/phpdoc/en/reference/runkit/sandbox-parent.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc/en/reference/runkit/sandbox-parent.xml diff -u phpdoc/en/reference/runkit/sandbox-parent.xml:1.2 phpdoc/en/reference/runkit/sandbox-parent.xml:1.3 --- phpdoc/en/reference/runkit/sandbox-parent.xml:1.2 Sat Oct 1 16:49:29 2005 +++ phpdoc/en/reference/runkit/sandbox-parent.xml Fri Nov 18 11:25:22 2005 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <!-- Generated by xml_proto.php v2.2. Found in /scripts directory of phpdoc. --> <refentry id="runkit.sandbox-parent"> <refnamediv> @@ -39,6 +39,7 @@ <?php $sandbox = new Runkit_Sandbox(); $sandbox['parent_access'] = true; +?> ]]> </programlisting> </example> http://cvs.php.net/diff.php/phpdoc/en/reference/pdo_mysql/constants.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc/en/reference/pdo_mysql/constants.xml diff -u phpdoc/en/reference/pdo_mysql/constants.xml:1.2 phpdoc/en/reference/pdo_mysql/constants.xml:1.3 --- phpdoc/en/reference/pdo_mysql/constants.xml:1.2 Fri Sep 16 13:36:09 2005 +++ phpdoc/en/reference/pdo_mysql/constants.xml Fri Nov 18 11:25:23 2005 @@ -1,5 +1,5 @@ <?xml version='1.0' encoding='iso-8859-1'?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <section id="pdo-mysql.constants"> &reftitle.constants; &pdo.driver-constants; @@ -21,12 +21,13 @@ <programlisting role='php'> <![CDATA[ <?php -if ($db->getAttribute(PDO_ATTR_DRIVERNAME) == 'mysql')) { - $stmt = $db->prepare('select * from foo', - array(PDO_MYSQL_ATTR_USE_UNBUFFERED_QUERY => true)); +if ($db->getAttribute(PDO_ATTR_DRIVERNAME) == 'mysql') { + $stmt = $db->prepare('select * from foo', + array(PDO_MYSQL_ATTR_USE_UNBUFFERED_QUERY => true)); } else { - die("my application only works with mysql; I should use \$stmt->fetchAll() instead"); + die("my application only works with mysql; I should use \$stmt->fetchAll() instead"); } +?> ]]> </programlisting> </example> http://cvs.php.net/diff.php/phpdoc/en/language/constants.xml?r1=1.41&r2=1.42&ty=u Index: phpdoc/en/language/constants.xml diff -u phpdoc/en/language/constants.xml:1.41 phpdoc/en/language/constants.xml:1.42 --- phpdoc/en/language/constants.xml:1.41 Wed Aug 3 14:18:42 2005 +++ phpdoc/en/language/constants.xml Fri Nov 18 11:25:23 2005 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.41 $ --> +<!-- $Revision: 1.42 $ --> <chapter id="language.constants"> <title>Constants</title> @@ -28,7 +28,7 @@ // Valid constant names define("FOO", "something"); define("FOO2", "something else"); -define("FOO_BAR", "something more") +define("FOO_BAR", "something more"); // Invalid constant names define("2FOO", "something"); http://cvs.php.net/diff.php/phpdoc/en/reference/apc/functions/apc-delete.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc/en/reference/apc/functions/apc-delete.xml diff -u phpdoc/en/reference/apc/functions/apc-delete.xml:1.1 phpdoc/en/reference/apc/functions/apc-delete.xml:1.2 --- phpdoc/en/reference/apc/functions/apc-delete.xml:1.1 Sun Aug 14 00:01:15 2005 +++ phpdoc/en/reference/apc/functions/apc-delete.xml Fri Nov 18 11:25:23 2005 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <refentry id="function.apc-delete"> <refnamediv> <refname>apc_delete</refname> @@ -47,7 +47,7 @@ <?php $bar = 'BAR'; apc_store('foo', $bar); -apc_delete('foo')); +apc_delete('foo'); // this is obviously useless in this form ?> ]]> http://cvs.php.net/diff.php/phpdoc/en/reference/pgsql/functions/pg-escape-bytea.xml?r1=1.9&r2=1.10&ty=u Index: phpdoc/en/reference/pgsql/functions/pg-escape-bytea.xml diff -u phpdoc/en/reference/pgsql/functions/pg-escape-bytea.xml:1.9 phpdoc/en/reference/pgsql/functions/pg-escape-bytea.xml:1.10 --- phpdoc/en/reference/pgsql/functions/pg-escape-bytea.xml:1.9 Sun Jul 3 23:29:33 2005 +++ phpdoc/en/reference/pgsql/functions/pg-escape-bytea.xml Fri Nov 18 11:25:23 2005 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.9 $ --> +<!-- $Revision: 1.10 $ --> <!-- splitted from ./en/functions/pgsql.xml, last change in rev 1.61 --> <refentry id='function.pg-escape-bytea'> <refnamediv> @@ -79,7 +79,7 @@ $escaped = pg_escape_bytea($data); // Insert it into the database - pg_query("INSERT INTO gallery (name, data) VALUES ('Pine trees', '{$escaped}')"; + pg_query("INSERT INTO gallery (name, data) VALUES ('Pine trees', '{$escaped}')"); ?> ]]> </programlisting> http://cvs.php.net/diff.php/phpdoc/en/reference/pgsql/functions/pg-escape-string.xml?r1=1.6&r2=1.7&ty=u Index: phpdoc/en/reference/pgsql/functions/pg-escape-string.xml diff -u phpdoc/en/reference/pgsql/functions/pg-escape-string.xml:1.6 phpdoc/en/reference/pgsql/functions/pg-escape-string.xml:1.7 --- phpdoc/en/reference/pgsql/functions/pg-escape-string.xml:1.6 Sun Jul 3 06:03:51 2005 +++ phpdoc/en/reference/pgsql/functions/pg-escape-string.xml Fri Nov 18 11:25:23 2005 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.6 $ --> +<!-- $Revision: 1.7 $ --> <!-- splitted from ./en/functions/pgsql.xml, last change in rev 1.61 --> <refentry id='function.pg-escape-string'> <refnamediv> @@ -71,7 +71,7 @@ $escaped = pg_escape_string($data); // Insert it into the database - pg_query("INSERT INTO correspondence (name, data) VALUES ('My letter', '{$escaped}')"; + pg_query("INSERT INTO correspondence (name, data) VALUES ('My letter', '{$escaped}')"); ?> ]]> </programlisting> http://cvs.php.net/diff.php/phpdoc/en/reference/filesystem/functions/is-uploaded-file.xml?r1=1.6&r2=1.7&ty=u Index: phpdoc/en/reference/filesystem/functions/is-uploaded-file.xml diff -u phpdoc/en/reference/filesystem/functions/is-uploaded-file.xml:1.6 phpdoc/en/reference/filesystem/functions/is-uploaded-file.xml:1.7 --- phpdoc/en/reference/filesystem/functions/is-uploaded-file.xml:1.6 Mon Feb 14 11:20:00 2005 +++ phpdoc/en/reference/filesystem/functions/is-uploaded-file.xml Fri Nov 18 11:25:23 2005 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.6 $ --> +<!-- $Revision: 1.7 $ --> <!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.39 --> <refentry id="function.is-uploaded-file"> <refnamediv> @@ -67,7 +67,7 @@ <![CDATA[ <?php /* Userland test for uploaded file. */ -function is_uploaded_file($filename) +function is_uploaded_file_4_0_2($filename) { if (!$tmp_file = get_cfg_var('upload_tmp_dir')) { $tmp_file = dirname(tempnam('', '')); @@ -79,7 +79,7 @@ /* This is how to use it, since you also don't have * move_uploaded_file() in these older versions: */ -if (is_uploaded_file($HTTP_POST_FILES['userfile'])) { +if (is_uploaded_file_4_0_2($HTTP_POST_FILES['userfile'])) { copy($HTTP_POST_FILES['userfile'], "/place/to/put/uploaded/file"); } else { echo "Possible file upload attack: filename '$HTTP_POST_FILES[userfile]'.";
http://cvs.php.net/diff.php/phpdoc/en/reference/sdo/reference.xml?r1=1.16&r2=1.17&ty=u Index: phpdoc/en/reference/sdo/reference.xml diff -u phpdoc/en/reference/sdo/reference.xml:1.16 phpdoc/en/reference/sdo/reference.xml:1.17 --- phpdoc/en/reference/sdo/reference.xml:1.16 Fri Oct 7 08:26:25 2005 +++ phpdoc/en/reference/sdo/reference.xml Fri Nov 18 11:25:22 2005 @@ -1,5 +1,5 @@ <?xml version='1.0' encoding='iso-8859-1'?> -<!-- $Revision: 1.16 $ --> +<!-- $Revision: 1.17 $ --> <!-- Purpose: database.abstract --> <!-- Membership: pecl --> <!-- State: experimental --> @@ -528,7 +528,7 @@ <![CDATA[ <?php foreach ($company as $name => $value) { - ... + // ... } ?> ]]> @@ -556,7 +556,7 @@ <![CDATA[ <?php foreach ($company->departments as $department) { - ... + // ... } ?> ]]> @@ -922,7 +922,7 @@ <![CDATA[ <?php foreach ($letter->getSequence() as $value) { - ... + // ... } ?> ]]> @@ -1015,7 +1015,7 @@ <programlisting role="php" id="sdo.examples.seqremove"> <![CDATA[ <?php - if (isset($letter_seq[0]) { + if (isset($letter_seq[0])) { unset($letter_seq[0]); } ?> http://cvs.php.net/diff.php/phpdoc/en/reference/sdo_das_xml/reference.xml?r1=1.11&r2=1.12&ty=u Index: phpdoc/en/reference/sdo_das_xml/reference.xml diff -u phpdoc/en/reference/sdo_das_xml/reference.xml:1.11 phpdoc/en/reference/sdo_das_xml/reference.xml:1.12 --- phpdoc/en/reference/sdo_das_xml/reference.xml:1.11 Fri Oct 7 05:43:24 2005 +++ phpdoc/en/reference/sdo_das_xml/reference.xml Fri Nov 18 11:25:22 2005 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.11 $ --> +<!-- $Revision: 1.12 $ --> <!-- Purpose: xml --> <!-- Membership: pecl --> <!-- State: experimental --> @@ -738,8 +738,7 @@ $emp1->manager = FALSE; $dept2 = $do->createDataObject("departments"); $emp2 = $dept2->createDataObject("employees"); -$emp2->n -ame = "Neil"; +$emp2->name = "Neil"; $emp2->manager = TRUE; print($xmldas->saveDataObjectToString($do, "companyNS", "CompanyType")); var_dump($do); http://cvs.php.net/diff.php/phpdoc/en/reference/runkit/sandbox-parent.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc/en/reference/runkit/sandbox-parent.xml diff -u phpdoc/en/reference/runkit/sandbox-parent.xml:1.2 phpdoc/en/reference/runkit/sandbox-parent.xml:1.3 --- phpdoc/en/reference/runkit/sandbox-parent.xml:1.2 Sat Oct 1 16:49:29 2005 +++ phpdoc/en/reference/runkit/sandbox-parent.xml Fri Nov 18 11:25:22 2005 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <!-- Generated by xml_proto.php v2.2. Found in /scripts directory of phpdoc. --> <refentry id="runkit.sandbox-parent"> <refnamediv> @@ -39,6 +39,7 @@ <?php $sandbox = new Runkit_Sandbox(); $sandbox['parent_access'] = true; +?> ]]> </programlisting> </example> http://cvs.php.net/diff.php/phpdoc/en/reference/pdo_mysql/constants.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc/en/reference/pdo_mysql/constants.xml diff -u phpdoc/en/reference/pdo_mysql/constants.xml:1.2 phpdoc/en/reference/pdo_mysql/constants.xml:1.3 --- phpdoc/en/reference/pdo_mysql/constants.xml:1.2 Fri Sep 16 13:36:09 2005 +++ phpdoc/en/reference/pdo_mysql/constants.xml Fri Nov 18 11:25:23 2005 @@ -1,5 +1,5 @@ <?xml version='1.0' encoding='iso-8859-1'?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <section id="pdo-mysql.constants"> &reftitle.constants; &pdo.driver-constants; @@ -21,12 +21,13 @@ <programlisting role='php'> <![CDATA[ <?php -if ($db->getAttribute(PDO_ATTR_DRIVERNAME) == 'mysql')) { - $stmt = $db->prepare('select * from foo', - array(PDO_MYSQL_ATTR_USE_UNBUFFERED_QUERY => true)); +if ($db->getAttribute(PDO_ATTR_DRIVERNAME) == 'mysql') { + $stmt = $db->prepare('select * from foo', + array(PDO_MYSQL_ATTR_USE_UNBUFFERED_QUERY => true)); } else { - die("my application only works with mysql; I should use \$stmt->fetchAll() instead"); + die("my application only works with mysql; I should use \$stmt->fetchAll() instead"); } +?> ]]> </programlisting> </example> http://cvs.php.net/diff.php/phpdoc/en/language/constants.xml?r1=1.41&r2=1.42&ty=u Index: phpdoc/en/language/constants.xml diff -u phpdoc/en/language/constants.xml:1.41 phpdoc/en/language/constants.xml:1.42 --- phpdoc/en/language/constants.xml:1.41 Wed Aug 3 14:18:42 2005 +++ phpdoc/en/language/constants.xml Fri Nov 18 11:25:23 2005 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.41 $ --> +<!-- $Revision: 1.42 $ --> <chapter id="language.constants"> <title>Constants</title> @@ -28,7 +28,7 @@ // Valid constant names define("FOO", "something"); define("FOO2", "something else"); -define("FOO_BAR", "something more") +define("FOO_BAR", "something more"); // Invalid constant names define("2FOO", "something"); http://cvs.php.net/diff.php/phpdoc/en/reference/apc/functions/apc-delete.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc/en/reference/apc/functions/apc-delete.xml diff -u phpdoc/en/reference/apc/functions/apc-delete.xml:1.1 phpdoc/en/reference/apc/functions/apc-delete.xml:1.2 --- phpdoc/en/reference/apc/functions/apc-delete.xml:1.1 Sun Aug 14 00:01:15 2005 +++ phpdoc/en/reference/apc/functions/apc-delete.xml Fri Nov 18 11:25:23 2005 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <refentry id="function.apc-delete"> <refnamediv> <refname>apc_delete</refname> @@ -47,7 +47,7 @@ <?php $bar = 'BAR'; apc_store('foo', $bar); -apc_delete('foo')); +apc_delete('foo'); // this is obviously useless in this form ?> ]]> http://cvs.php.net/diff.php/phpdoc/en/reference/pgsql/functions/pg-escape-bytea.xml?r1=1.9&r2=1.10&ty=u Index: phpdoc/en/reference/pgsql/functions/pg-escape-bytea.xml diff -u phpdoc/en/reference/pgsql/functions/pg-escape-bytea.xml:1.9 phpdoc/en/reference/pgsql/functions/pg-escape-bytea.xml:1.10 --- phpdoc/en/reference/pgsql/functions/pg-escape-bytea.xml:1.9 Sun Jul 3 23:29:33 2005 +++ phpdoc/en/reference/pgsql/functions/pg-escape-bytea.xml Fri Nov 18 11:25:23 2005 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.9 $ --> +<!-- $Revision: 1.10 $ --> <!-- splitted from ./en/functions/pgsql.xml, last change in rev 1.61 --> <refentry id='function.pg-escape-bytea'> <refnamediv> @@ -79,7 +79,7 @@ $escaped = pg_escape_bytea($data); // Insert it into the database - pg_query("INSERT INTO gallery (name, data) VALUES ('Pine trees', '{$escaped}')"; + pg_query("INSERT INTO gallery (name, data) VALUES ('Pine trees', '{$escaped}')"); ?> ]]> </programlisting> http://cvs.php.net/diff.php/phpdoc/en/reference/pgsql/functions/pg-escape-string.xml?r1=1.6&r2=1.7&ty=u Index: phpdoc/en/reference/pgsql/functions/pg-escape-string.xml diff -u phpdoc/en/reference/pgsql/functions/pg-escape-string.xml:1.6 phpdoc/en/reference/pgsql/functions/pg-escape-string.xml:1.7 --- phpdoc/en/reference/pgsql/functions/pg-escape-string.xml:1.6 Sun Jul 3 06:03:51 2005 +++ phpdoc/en/reference/pgsql/functions/pg-escape-string.xml Fri Nov 18 11:25:23 2005 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.6 $ --> +<!-- $Revision: 1.7 $ --> <!-- splitted from ./en/functions/pgsql.xml, last change in rev 1.61 --> <refentry id='function.pg-escape-string'> <refnamediv> @@ -71,7 +71,7 @@ $escaped = pg_escape_string($data); // Insert it into the database - pg_query("INSERT INTO correspondence (name, data) VALUES ('My letter', '{$escaped}')"; + pg_query("INSERT INTO correspondence (name, data) VALUES ('My letter', '{$escaped}')"); ?> ]]> </programlisting> http://cvs.php.net/diff.php/phpdoc/en/reference/filesystem/functions/is-uploaded-file.xml?r1=1.6&r2=1.7&ty=u Index: phpdoc/en/reference/filesystem/functions/is-uploaded-file.xml diff -u phpdoc/en/reference/filesystem/functions/is-uploaded-file.xml:1.6 phpdoc/en/reference/filesystem/functions/is-uploaded-file.xml:1.7 --- phpdoc/en/reference/filesystem/functions/is-uploaded-file.xml:1.6 Mon Feb 14 11:20:00 2005 +++ phpdoc/en/reference/filesystem/functions/is-uploaded-file.xml Fri Nov 18 11:25:23 2005 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.6 $ --> +<!-- $Revision: 1.7 $ --> <!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.39 --> <refentry id="function.is-uploaded-file"> <refnamediv> @@ -67,7 +67,7 @@ <![CDATA[ <?php /* Userland test for uploaded file. */ -function is_uploaded_file($filename) +function is_uploaded_file_4_0_2($filename) { if (!$tmp_file = get_cfg_var('upload_tmp_dir')) { $tmp_file = dirname(tempnam('', '')); @@ -79,7 +79,7 @@ /* This is how to use it, since you also don't have * move_uploaded_file() in these older versions: */ -if (is_uploaded_file($HTTP_POST_FILES['userfile'])) { +if (is_uploaded_file_4_0_2($HTTP_POST_FILES['userfile'])) { copy($HTTP_POST_FILES['userfile'], "/place/to/put/uploaded/file"); } else { echo "Possible file upload attack: filename '$HTTP_POST_FILES[userfile]'.";