Re: [PHP] xml v php question
On Tue, July 25, 2006 8:33 am, David Tulloh wrote: Larry Garfield wrote: Disable short tags. The correct answer is (b). (PHP 6 won't even have short tags, so get used to not having them.) Can you find anywhere where this was announced? I don't recall seeing any decision on it. A quick search found several mentions of the devs deciding to keep short tags when going from php 4 to php 5. The php 6 todo list shows that % will be removed but ? will stay. The Meeting Notes from the Devs getting together in Paris sez: http://www.php.net/~derick/meeting-notes.html#remove-support-for-and-script-language-php-and-add-php-var This may be out-dated... Personally, I would not miss ? much, but ?= is quite convenient, if it would just work ALWAYS instead of by configuration option. Oh well. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] xml v php question
Larry Garfield wrote: Disable short tags. If short tags are enabled, the PHP parser sees the ? and switches into PHP mode. It then starts parsing the xml and sees that it's not proper PHP, and freaks out. You can: a) Use PHP to print out the XML declaration as a string: ?php print '?xml version=1.0 encoding=utf-8?'; ? b) Disable short tags so that the PHP parser ignores ? and only recognizes ?php. The correct answer is (b). (PHP 6 won't even have short tags, so get used to not having them.) Can you find anywhere where this was announced? I don't recall seeing any decision on it. A quick search found several mentions of the devs deciding to keep short tags when going from php 4 to php 5. The php 6 todo list shows that % will be removed but ? will stay. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] xml v php question
At 11:01 PM -0500 7/24/06, Larry Garfield wrote: Disable short tags. If short tags are enabled, the PHP parser sees the ? and switches into PHP mode. It then starts parsing the xml and sees that it's not proper PHP, and freaks out. You can: Bingo ! That works : ) Apparently the better minds are on this list. Thanks very much. tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] xml v php question
This one time, at band camp, Larry Garfield [EMAIL PROTECTED] wrote: The correct answer is (b). (PHP 6 won't even have short tags, so get used to not having them.) ummm, I think it was decided to stay in php6. I could be mildly/wildly mistaken Kevin -- Democracy is two wolves and a lamb voting on what to have for lunch. Liberty is a well-armed lamb contesting the vote. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] xml v php question
On Tue, July 25, 2006 3:15 pm, Kevin Waterson said: This one time, at band camp, Larry Garfield [EMAIL PROTECTED] wrote: The correct answer is (b). (PHP 6 won't even have short tags, so get used to not having them.) ummm, I think it was decided to stay in php6. I could be mildly/wildly mistaken Kevin The last I heard, they were still slated for removal. The PHP core team does have a habit of changing their minds about such things on a regular basis, however, so who knows what their plan is this week. :-) --Larry Garfield -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] xml v php question
On Tue, July 25, 2006 3:15 pm, Kevin Waterson said: This one time, at band camp, Larry Garfield [EMAIL PROTECTED] wrote: The correct answer is (b). (PHP 6 won't even have short tags, so get used to not having them.) ummm, I think it was decided to stay in php6. I could be mildly/wildly mistaken Kevin The last I heard, they were still slated for removal. The PHP core team does have a habit of changing their minds about such things on a regular basis, however, so who knows what their plan is this week. :-) What the PHP core team does or doesn't do has no bearing on the fact that short tags are bad voodoo. Just say no to short tags, and your life will be easier, your shirts whiter, and your teeth brighter! JM -- who has never used short tags, and never will -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] xml v php question
Hi gang: Why does starting my php script with -- ?xml version=1.0 encoding=utf-8? -- stop it from running? I would like to use php in a page, but the page has to begin with a xml declaration to generate a quirksmode for IE6 and under while permitting IE7 to be left in standards mode. We've tried it in both Wordpress and Textpattern and both are php and neither are able to parse a document with an xml declaration above the header. Is this problem solvable? I've been told that better minds have already tried and failed to resolve this issue. So, what say you group? Thanks in advance for any replies, comments, explanations, or solutions. tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] xml v php question
Disable short tags. If short tags are enabled, the PHP parser sees the ? and switches into PHP mode. It then starts parsing the xml and sees that it's not proper PHP, and freaks out. You can: a) Use PHP to print out the XML declaration as a string: ?php print '?xml version=1.0 encoding=utf-8?'; ? b) Disable short tags so that the PHP parser ignores ? and only recognizes ?php. The correct answer is (b). (PHP 6 won't even have short tags, so get used to not having them.) On Monday 24 July 2006 20:42, tedd wrote: Hi gang: Why does starting my php script with -- ?xml version=1.0 encoding=utf-8? -- stop it from running? I would like to use php in a page, but the page has to begin with a xml declaration to generate a quirksmode for IE6 and under while permitting IE7 to be left in standards mode. We've tried it in both Wordpress and Textpattern and both are php and neither are able to parse a document with an xml declaration above the header. Is this problem solvable? I've been told that better minds have already tried and failed to resolve this issue. So, what say you group? Thanks in advance for any replies, comments, explanations, or solutions. tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- Larry Garfield AIM: LOLG42 [EMAIL PROTECTED] ICQ: 6817012 If nature has made any one thing less susceptible than all others of exclusive property, it is the action of the thinking power called an idea, which an individual may exclusively possess as long as he keeps it to himself; but the moment it is divulged, it forces itself into the possession of every one, and the receiver cannot dispossess himself of it. -- Thomas Jefferson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] xml and php question
Hey all I'm not so sure if this is the correct place to ask this question, but I'm hoping some of you will be able to give me some feedback. I am currently toying around with php and mysql developing a website for myself, the current one is partly php powered, but I am trying to move it over to a complete php and mysql system, I would also like to use XML. i have previously used Xml on another web project, and i really liked the way you could reformat you content, and it's ease of use. What i was wondering is, if any of you use XML to store your content, in what way do you go about it. At the moment i see 2 sepeerate ways of going about it. a)Mark up your documents in xml and store the xml documents in a database, your database can be pretty simple, witha couple of fields that represent some of the meta data in the xml file, e.g. Author, Date-created, then a large blob which is the doc. when you wish to view the document, you search on the criteria that is available, and then retrieve your xml doc. Some down sides to this could be the explosion in the size of the db, if you are storing a large amount of documents etc and also the redundancy in some of hte fields, e.g you have an author field, but this info is contained in the xml doc. It is good, because it is an essentialy simple application, in both php code to pull the data and in the database design. b)have the database act as a sort of XML holder, e.g. break the document down to it's base components, and store all the meta data in the database, when a doc is needed, the xml doc can be created on the fly, by pulling the data out of the appropriate fields. some problems with this can be the database design, it can become extremly complicated(i would imagine, i have not tried it yet), as you are effiectively modelling the DTD in the database. but at the same time, we are reducing redundancy, hopefully, so long as it is well normalised. the reason i am asking this is becaue of the amount i read about xml, how good it is extensible etc, there is not much out there inregards to the practical application of it, aside form the odd tutorial on how to construct a DTD or how to parse XMl with Java/PHP etc. once again, i'm not sure if this post is appropriate to this mailing list, perhaps i should send it to a MySql list or something, but if anyone has any ideas or thoughts on the topic i would really appreciate it. -- 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]