[PHP] get_meta_tags bug?
Hi, The php function 'get_meta_tags' doesn't work when the meta tag name/ content values are single quoted. It's fine for double quotes. I've had a look but can't find anything on the w3 site to say whether or not double quotes are required in meta tags. Does anyone know what the rule is? (php v 4.04pl1, apache, linux 2.2.18) All the best -- Paul -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] get_meta_tags bug?
In article <997dil$t5u$[EMAIL PROTECTED]>, Yasuo Ohgaki <[EMAIL PROTECTED]> writes >> "Paul Rees" <[EMAIL PROTECTED]> wrote in message >> r19NDKAFmot6Ew$[EMAIL PROTECTED]">news:r19NDKAFmot6Ew$[EMAIL PROTECTED]... >> > Hi, >> > >> > The php function 'get_meta_tags' doesn't work when the meta tag name/ >> > content values are single quoted. It's fine for double quotes. I've had >> > a look but can't find anything on the w3 site to say whether or not >> > double quotes are required in meta tags. Does anyone know what the rule >> > is? >> > >> > (php v 4.04pl1, apache, linux 2.2.18) >FYI: >Looks like it is fixed in CVS version and get_meta_tags() now accepts single >quotes. >(I still recommends to use double quotes for your application, but we cannot >force >others and single quotes should be accepted for older HTML versions) Yes, you're right. Thanks very much. Out of interest, why do you recommend the use of double quotes? It's so much easier to use single quotes in these sort of cases: echo "\n"; rather than: echo "\n"; or: echo '' . "\n"; ...and according to this: http://www.w3.org/TR/html4/intro/sgmltut.html#h-3.2.2 ... double, single, and (sometimes) no quotes are all acceptable. All the best, -- Paul Rees -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Installing PEAR
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] writes >Ok, IM a bit confused as to how PEAR is installed. I read through the README >file in the php source but found no explanation. > >I am tryin to use the PEARs DB abstracion. I have DB.php and DB/ in >/usr/local/lib/php. I added: 'include_once(DB/mysql.php);' to the top of my >script but it failed since it is not finding it. Do I need to assign a path in >the php.ini file or have I missed an installation step? > >Can somebody please explain or point me to some docs on how I get up and going >with PEAR. Hi, Try something like: query ($sql))) handle_db_error ($result); else $resultArray = $result -> fetchRow (DB_FETCHMODE_ASSOC); $db_con -> commit(); if ($db_con && (! $usePersistentConnects)) $db_con -> disconnect(); ?> I hope the line wraps still leave the above readable. I made a separate function of my own, handle_db_error (), to handle errors - you might like to do something like: echo DB::errorMessage($result); ... instead. I recommend putting all the db connection stuff in a file which resides outside of the document root and including it where you need it. The following links may prove useful - the user comments in the phpbuilder article were particularly helpful in pointing me in the right direction. http://cvs.php.net/viewcvs.cgi/php4/pear/DB/ http://www.phpdoc.de/pear/index2.html http://www.phpbuilder.com/columns/allan20010115.php3 http://pear.php.net http://www.php.net/manual/en/pear.php All the best, -- Paul Rees Web Application Programmer/Developer surfEU.com GmbH -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]