[PHP-DOC] cvs: phpdoc /en/reference/strings/functions addslashes.xml stripslashes.xml

2003-07-24 Thread Philip Olson
philip  Thu Jul 24 04:48:10 2003 EDT

  Modified files:  
/phpdoc/en/reference/strings/functions  stripslashes.xml 
addslashes.xml 
  Log:
  Drastically increase descriptions and example uses, added an example, and
  see also get_magic_quotes_gpc().
  
  
Index: phpdoc/en/reference/strings/functions/stripslashes.xml
diff -u phpdoc/en/reference/strings/functions/stripslashes.xml:1.2 
phpdoc/en/reference/strings/functions/stripslashes.xml:1.3
--- phpdoc/en/reference/strings/functions/stripslashes.xml:1.2  Wed Apr 17 02:44:23 
2002
+++ phpdoc/en/reference/strings/functions/stripslashes.xml  Thu Jul 24 04:48:10 
2003
@@ -1,5 +1,5 @@
 ?xml version=1.0 encoding=iso-8859-1?
-!-- $Revision: 1.2 $ --
+!-- $Revision: 1.3 $ --
 !-- splitted from ./en/functions/strings.xml, last change in rev 1.2 --
   refentry id=function.stripslashes
refnamediv
@@ -17,10 +17,35 @@
 para
  Returns a string with backslashes stripped off.
  (literal\'/literal becomes literal'/literal and so on.)
- Double backslashes are made into a single backslash.
+ Double backslashes (literal\\/literal) are made into a single
+ backslash (literal\/literal). 
+/para
+para
+ An example use of functionstripslashes/function is when the PHP
+ directive link linkend=ini.magic-quotes-gpcmagic_quotes_gpc/link
+ is literalon/literal (it's on by default), and you aren't inserting
+ this data into a place (such as a database) that requires escaping.
+ For example, if you're simply outputting data straight from an HTML
+ form.
+/para
+para
+ example
+  titleA functionstripslashes/function example/title
+  programlisting role=php
+![CDATA[
+?php
+$str = Is your name O\'reilly?;
+
+// Outputs: Is your name O'reilly?
+echo stripslashes($str);
+?
+]]
+  /programlisting
+ /example
 /para
 simpara
- See also functionaddslashes/function.
+ See also functionaddslashes/function and
+ functionget_magic_quotes_gpc/function.
 /simpara
/refsect1
   /refentry
Index: phpdoc/en/reference/strings/functions/addslashes.xml
diff -u phpdoc/en/reference/strings/functions/addslashes.xml:1.2 
phpdoc/en/reference/strings/functions/addslashes.xml:1.3
--- phpdoc/en/reference/strings/functions/addslashes.xml:1.2Wed Apr 17 02:44:13 
2002
+++ phpdoc/en/reference/strings/functions/addslashes.xmlThu Jul 24 04:48:10 
2003
@@ -1,5 +1,5 @@
 ?xml version=1.0 encoding=iso-8859-1?
-!-- $Revision: 1.2 $ --
+!-- $Revision: 1.3 $ --
 !-- splitted from ./en/functions/strings.xml, last change in rev 1.2 --
   refentry id=function.addslashes
refnamediv
@@ -19,15 +19,49 @@
  (literal/literal), backslash (literal\/literal)
  and NUL (the null; byte).
 /para
-note
- para
-  link linkend=ini.magic-quotes-gpcmagic_quotes_gpc/link is ON by default.
- /para
-/note
+para
+ An example use of functionaddslashes/function is when you're
+ entering data into a database.  For example, to insert the name 
+ literalO'reilly/literal into a database, you will need to escape
+ it.  Most databases do this with a literal\/literal which would
+ mean literalO\'reilly/literal.  This would only be to get the data
+ into the database, the extra literal\/literal will not be inserted.
+ Having the PHP directive link linkend=ini.magic-quotes-sybase
+ magic_quotes_sybase/link set to literalon/literal will mean 
+ literal'/literal is instead escaped with another 
+ literal'/literal.
+/para
+para
+ The PHP directive link linkend=ini.magic-quotes-gpc
+ magic_quotes_gpc/link is literalon/literal by default, and it 
+ essentially runs functionaddslashes/function on all GET, POST,
+ and COOKIE data.  Do not use functionaddslashes/function on
+ strings that have already been escaped with 
+ link linkend=ini.magic-quotes-gpcmagic_quotes_gpc/link as you'll
+ then do double escaping.  The function
+ functionget_magic_quotes_gpc/function may come in handy for 
+ checking this.
+/para
+para
+ example
+  titleAn functionaddslashes/function example/title
+  programlisting role=php
+![CDATA[
+?php
+$str = Is your name O'reilly?;
+
+// Outputs: Is your name O\'reilly?
+echo addslashes($str);
+?
+]]
+  /programlisting
+ /example
+/para
 para
  See also functionstripslashes/function, 
- functionhtmlspecialchars/function, and
- functionquotemeta/function.
+ functionhtmlspecialchars/function,
+ functionquotemeta/function, and 
+ functionget_magic_quotes_gpc/function.
 /para
/refsect1
   /refentry



-- 
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DOC] cvs: phpdoc /en/reference/strings/functions htmlentities.xml md5.xml sha1.xml strlen.xml

2003-07-24 Thread Philip Olson
philip  Thu Jul 24 05:13:46 2003 EDT

  Modified files:  
/phpdoc/en/reference/strings/functions  htmlentities.xml md5.xml 
sha1.xml strlen.xml 
  Log:
  Added an example.
  
  
Index: phpdoc/en/reference/strings/functions/htmlentities.xml
diff -u phpdoc/en/reference/strings/functions/htmlentities.xml:1.9 
phpdoc/en/reference/strings/functions/htmlentities.xml:1.10
--- phpdoc/en/reference/strings/functions/htmlentities.xml:1.9  Mon Mar  3 13:03:12 
2003
+++ phpdoc/en/reference/strings/functions/htmlentities.xml  Thu Jul 24 05:13:45 
2003
@@ -1,5 +1,5 @@
 ?xml version=1.0 encoding=iso-8859-1?
-!-- $Revision: 1.9 $ --
+!-- $Revision: 1.10 $ --
 !-- splitted from ./en/functions/strings.xml, last change in rev 1.2 --
   refentry id=function.htmlentities
refnamediv
@@ -67,6 +67,24 @@
 para
  If you're wanting to decode instead (the reverse) you can use
  functionhtml_entity_decode/function.
+/para
+para
+ example
+  titleA functionhtmlentities/function example/title
+  programlisting role=php
+![CDATA[
+?php
+$str = A 'quote' is bbold/b;
+
+// Outputs: A 'quote' is lt;bgt;boldlt;/bgt;
+echo htmlentities($str);
+
+// Outputs: A #039;quote#039; is lt;bgt;boldlt;/bgt;
+echo htmlentities($str, ENT_QUOTES);
+?
+]]
+  /programlisting
+ /example
 /para
 para
  See also functionhtml_entity_decode/function, 
Index: phpdoc/en/reference/strings/functions/md5.xml
diff -u phpdoc/en/reference/strings/functions/md5.xml:1.6 
phpdoc/en/reference/strings/functions/md5.xml:1.7
--- phpdoc/en/reference/strings/functions/md5.xml:1.6   Wed May  7 17:31:30 2003
+++ phpdoc/en/reference/strings/functions/md5.xml   Thu Jul 24 05:13:45 2003
@@ -1,5 +1,5 @@
 ?xml version=1.0 encoding=iso-8859-1?
-!-- $Revision: 1.6 $ --
+!-- $Revision: 1.7 $ --
 !-- splitted from ./en/functions/strings.xml, last change in rev 1.135 --
   refentry id=function.md5
refnamediv
@@ -27,6 +27,23 @@
   PHP 5.0.0 and defaults to false;
  /simpara
 /note
+para
+ example
+  titleA functionmd5/function example/title
+  programlisting role=php
+![CDATA[
+?php
+$str = 'apple';
+
+if (md5($str) === '1f3870be274f6c49b3e31a0c6728957f') {
+echo Would you like a green or red apple?;
+exit;
+}
+?
+]]
+  /programlisting
+ /example
+/para
 para
  See also functioncrc32/function, functionmd5_file/function, 
  and functionsha1/function.
Index: phpdoc/en/reference/strings/functions/sha1.xml
diff -u phpdoc/en/reference/strings/functions/sha1.xml:1.5 
phpdoc/en/reference/strings/functions/sha1.xml:1.6
--- phpdoc/en/reference/strings/functions/sha1.xml:1.5  Wed May  7 17:31:30 2003
+++ phpdoc/en/reference/strings/functions/sha1.xml  Thu Jul 24 05:13:45 2003
@@ -1,5 +1,5 @@
 ?xml version=1.0 encoding=iso-8859-1?
-!-- $Revision: 1.5 $ --
+!-- $Revision: 1.6 $ --
   refentry id=function.sha1
refnamediv
 refnamesha1/refname
@@ -26,6 +26,23 @@
   PHP 5.0.0 and defaults to false;
  /simpara
 /note
+para
+ example
+  titleA functionsha1/function example/title
+  programlisting role=php
+![CDATA[
+?php
+$str = 'apple';
+ 
+if (sha1($str) === 'd0be2dc421be4fcd0172e5afceea3970e2f3d940') {
+echo Would you like a green or red apple?;
+exit;
+}
+?
+]]
+  /programlisting
+ /example
+/para
 simpara
  See also functionsha1_file/function, functioncrc32/function,
  and functionmd5/function 
Index: phpdoc/en/reference/strings/functions/strlen.xml
diff -u phpdoc/en/reference/strings/functions/strlen.xml:1.2 
phpdoc/en/reference/strings/functions/strlen.xml:1.3
--- phpdoc/en/reference/strings/functions/strlen.xml:1.2Wed Apr 17 02:44:23 
2002
+++ phpdoc/en/reference/strings/functions/strlen.xmlThu Jul 24 05:13:45 2003
@@ -1,5 +1,5 @@
 ?xml version=1.0 encoding=iso-8859-1?
-!-- $Revision: 1.2 $ --
+!-- $Revision: 1.3 $ --
 !-- splitted from ./en/functions/strings.xml, last change in rev 1.2 --
   refentry id=function.strlen
refnamediv
@@ -14,6 +14,25 @@
  /methodsynopsis
 para
  Returns the length of parameterstring/parameter.
+/para
+para
+ example
+  titleA functionstrlen/function example/title
+  programlisting role=php
+![CDATA[
+?php
+$str = 'abcdef';
+echo strlen($str); // 6
+
+$str = ' ab cd ';
+echo strlen($str); // 7
+?
+]]
+  /programlisting
+ /example
+/para
+para
+ See also functioncount/function.
 /para
/refsect1
   /refentry



-- 
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DOC] #24789 [NEW]: English error in strip_tags documentation

2003-07-24 Thread chris dot blackburn at softhome dot net
From: chris dot blackburn at softhome dot net
Operating system: 
PHP version:  Irrelevant
PHP Bug Type: Documentation problem
Bug description:  English error in strip_tags documentation

Description:

On the documentation for the strip_tags function
(http://www.php.net/manual/en/function.strip-tags.php), the second
sentence reads: It errors on the side of caution in case of incomplete or
bogus tags.

I would assume this is meant to read It errs on the side of caution..


-- 
Edit bug report at http://bugs.php.net/?id=24789edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=24789r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=24789r=trysnapshot5
Fixed in CVS:   http://bugs.php.net/fix.php?id=24789r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=24789r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=24789r=needtrace
Try newer version:  http://bugs.php.net/fix.php?id=24789r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=24789r=support
Expected behavior:  http://bugs.php.net/fix.php?id=24789r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=24789r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=24789r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=24789r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24789r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=24789r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=24789r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=24789r=gnused


-- 
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DOC] cvs: phpdoc /dsssl/docbook/common dbl1he.ent

2003-07-24 Thread Moshe Doron
momoThu Jul 24 05:34:42 2003 EDT

  Modified files:  
/phpdoc/dsssl/docbook/commondbl1he.ent 
  Log:
  make derick's openjade happy (hopefully)
  
Index: phpdoc/dsssl/docbook/common/dbl1he.ent
diff -u phpdoc/dsssl/docbook/common/dbl1he.ent:1.2 
phpdoc/dsssl/docbook/common/dbl1he.ent:1.3
--- phpdoc/dsssl/docbook/common/dbl1he.ent:1.2  Tue Jul 22 01:09:22 2003
+++ phpdoc/dsssl/docbook/common/dbl1he.ent  Thu Jul 24 05:34:41 2003
@@ -1,4 +1,4 @@
-?xml version=1.0 encoding=ISO-8859-8?
+?xml version=1.0 encoding=WINDOWS-1255?
 !-- This file is hack for using ascii hebrew on docbook --
 !-- by moshe doron[EMAIL PROTECTED] --
 



-- 
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DOC] Files with executable permissions

2003-07-24 Thread Gabor Hojtsy
Some XML source files in the en/ tree have their executable permissions
set [1]. Is there a specific reason for this? This is a bit confusing,
for example for translators: I first thought it meant something like Do
not translate, or another warning about the file.
Maybe they were inserted into the repository from a Windows computer? I
have noticed that files on a Windows computer, when accessed from a
Linux computer, have their executable permissions set.
Maybe. What's the problem with this? Just don't try to run them ;)

Goba

--
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DOC] #24789 [Opn-WFx]: English error in strip_tags documentation

2003-07-24 Thread philip
 ID:  24789
 Updated by:  [EMAIL PROTECTED]
 Reported By: chris dot blackburn at softhome dot net
-Status:  Open
+Status:  Wont fix
 Bug Type:Documentation problem
 PHP Version: Irrelevant
 New Comment:

Not many people are familiar with this word, error is pretty clear
though.  Marking as Won't fix.


Previous Comments:


[2003-07-24 04:18:58] chris dot blackburn at softhome dot net

Description:

On the documentation for the strip_tags function
(http://www.php.net/manual/en/function.strip-tags.php), the second
sentence reads: It errors on the side of caution in case of incomplete
or bogus tags.

I would assume this is meant to read It errs on the side of caution..






-- 
Edit this bug report at http://bugs.php.net/?id=24789edit=1


-- 
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DOC] Variables/Include Problem

2003-07-24 Thread Eric Fleming
I am having some problems using variables in included files.  Can someone
please look at my code below and see how I might accomplish what I am trying
to do?

?php
 $subnav = home;
 include(incHeader.php);
?

!--- CONTENT AREA ---

The content would go here.

!--- END CONTENT AREA ---

?php include (incFooter.php); ?

Now, when I try to reference the subnav variable in the inHeader.php or
incFooter.php files, it comes up blank.  I am basically trying to adjust the
navigation on each page depending on the page I am on.  I am just learning
PHP, have programmed in ColdFusion for years and in ColdFusion this was not
a problem.  Any ideas?

Eric Fleming



-- 
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DOC] Variables/Include Problem

2003-07-24 Thread Philip Olson

Hello Eric-

Wrong list, have a look here:

  http://www.php.net/support.php

php-general would be a more appropriate list.

Regards,
Philip


On Thu, 24 Jul 2003, Eric Fleming wrote:

 I am having some problems using variables in included files.  Can someone
 please look at my code below and see how I might accomplish what I am trying
 to do?
 
 ?php
  $subnav = home;
  include(incHeader.php);
 ?
 
 !--- CONTENT AREA ---
 
 The content would go here.
 
 !--- END CONTENT AREA ---
 
 ?php include (incFooter.php); ?
 
 Now, when I try to reference the subnav variable in the inHeader.php or
 incFooter.php files, it comes up blank.  I am basically trying to adjust the
 navigation on each page depending on the page I am on.  I am just learning
 PHP, have programmed in ColdFusion for years and in ColdFusion this was not
 a problem.  Any ideas?
 
 Eric Fleming
 
 
 
 -- 
 PHP Documentation Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


-- 
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php