Sometimes you just get a brain deadlock on the simplist thing. A few weeks ago I was converting some pages on a site to xhtml 1.0 strict. As you probably know, this requires each page to start with the following xml declaration:
< ?xml version="1.0" encoding="utf-8" ?>
No problem right? Wrong. That decleration is similar to the start of a php decleration:
< ?php
Needless to say it creates an error when you try to load the page. That’s where things went nuts and I was drawing a blank. “This should be easy to do” I kept saying to myself. “What am I missing”. Geesh, how stupid did I feel when it finally hit me. Here’s all you need to do. Put the following php command on the first line of the document:
echo '< ?xml version=\"1.0\" encoding=\"utf-8\"?>\n';
Just figured I’d post this in case someone else had a brain freeze as bad as the one I had.
12 users commented in " xml decleration in php "
Follow-up comment rss or Leave a TrackbackЭто прямо в точку!!! По другому и не скажешь!
Спасибо, пост действительно грамотно написан и по делу, есть что почерпнуть.
Ну естественно, действительно так оно и есть.
Да таков наш современный мир и боюсь с этим ни чего нельзя поделать:)
На Ваш блог знакомый в аську ссылку кинул. Оказалось ,что не зря
Понравилось. Тепрь все время читать буду 
Замечательно! Все бы так писали
Fully agree with you, about a week ago wrote about the same in his blog!
Текст оставил сложное, даже в какой-то степени неоднозначное, впечатление… Даже не знаю, что сказать… Нужно время, чтобы обдумать прочитанное.
Достаточно спорно, но как вариант имеет право на существование
Thank you for answering all the questions in your post. In fact, learned a lot. That’s only until the end and did not understand what and where.
Данный пост действительно помог мне принять очень нужное для меня решение. За это автору отдельное спасибо! С большим нетерпением жду от Вас новых сообщений!
Возможно ли оценить вероятность правильности теории вероятности?
Leave A Reply