Jump to content
Larry Ullman's Book Forums

damilola

Members
  • Posts

    18
  • Joined

  • Last visited

damilola's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Thank you so much larry. Can u please and I say pls again, tell me why in chapter 14 (making universal sites) script 14.2 and upwards don't seem to be running as u said it would in the book. When I run the codes with my php 5.4.3 I get the result u said one would get if he ws running on php 5.2 or less. I already created a topic on dis (unicode) but did nt really get much understanding from what ppl said. Pls help me out have been stuck @ chpter 14 for the past one month now. Can wait to see ur reply sire. Thanks a lot.
  2. Pls after tring out the locale script in chapter 14. I encountered an error. Note am using wamp 2.2e which has php 5.4.3. This is the code: <?php header ('Content-Type: text/html; charset=UTF-8'); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Locales</title> </head> <body style="font-size: 18pt;"> <?php # Script 14.5 - locales.php // Set the default timezone: date_default_timezone_set('UTC'); // Need a date object: $d = new DateTime(); // Create a list of locales: $locales = array('en_US', 'fr_FR', 'es_BO', 'zh_Hans_CN', 'ru_RU', 'el_GR', 'is_IS'); // Print the date in each locale: foreach ($locales as $locale) { // Set the locale: locale_set_default($locale); // Print the date: echo "<p>$locale: " . strtotitle(date_format_locale($d, 'l, j F Y')) . "</p>\n"; } ?> </body> </html> This is the error encountered: ( ! ) Fatal error: Call to undefined function locale_set_default() in C:\wamp\www\phpmyql3_scripts\ch14\locales.php on line 25 Call Stack # Time Memory Function Location 1 0.0021 142912 {main}( ) ..\locales.php:0 Pls help. Thanks.
  3. Am not trying to troll u people, but thanks for all the help I really appreciate.
  4. Thank u §☺ much @hartlySan and StephenM, I really appreciate u all. Now going by the book and the authour, on page 423 we can have 2 result of d Script 14.2 based on the version of php u are running(which has been displayed above), which are the following: U get this when running php6: joάo has 4 characters JOάO in capital letters ҐѾργζ has 7 characters ҐѾργζ in capital letters Anton has 5 characters ANTON in capital letter s KamilÐ has 5 characters KAMILÐ in capital letters FranĞiška has 6 characters FRANĞIšKA in capital letters 愛子 has 2 characters 愛子 in capital letters 杰西卡 has 3 characters 杰西卡 in capital letters U get this when running under Php5.2: joάo has 5 characters JOάO in capital letters ҐѾργζ has 10 characters ҐѾργζ in capital letters Anton has 5 characters ANTON in capital letters KamilÐ has 7 characters KAMILÐ in capital letters FranĞiška has 11 characters FRANĞIšKA in capital letters 愛子 has 6 characters 愛子 in capital letters 杰西卡 has 9 characters 杰西卡 in capital letters Now d issue is that am using php 5.4.3, which according to what have seen and read from the net is that php 5.4 is the latest version of php, php 6 is not yet out there. §☺ since am using Php 5.4.3, y am I get a result for php 5.2 or below ?. Pls this is my main problem, am a beignner with php and I have found it hard to move forward, cos ave been stuck witb dis issue for alomst a month now. Don't mean to take up ur time, jst need help. Thank you so much people.
  5. According to the book, larry said php 5.2 will give the result I just posted. Am thinking maybe I have to do somethings in my php.ini file. Or shld I jst reinstall the wamp 2.2. Am very sorry if am disturbing HartleySan, just don't like not geting a part of a book am reading, I find it hard to move on to other chapters.
  6. This is the code, and someone said it runs fine. <?php header ('Content-Type: text/html; charset=UTF-8'); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " http://www.w3.org/ TR...ransitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/ html; charset=utf-8" /> <title>Untitled Document</title> </head> <body> <?php $names = array('joάo','ҐѾργζ', 'Anton', 'KamilÐ', 'FranĞiška','愛子', '杰西卡'); foreach ($names as $name) { echo "<p>$name has ".strlen($name)." characters <br />\n".strtoupper($name)." in capital letters</p> \n"; } ?> </body> </html> This is the result: joάo has 5 characters JOάO in capital letters ҐѾργζ has 10 characters ҐѾργζ in capital letters Anton has 5 characters ANTON in capital letters KamilÐ has 7 characters KAMILÐ in capital letters FranĞiška has 11 characters FRANĞIšKA in capital letters 愛子 has 6 characters 愛子 in capital letters 杰西卡 has 9 characters 杰西卡 in capital letters. (This can be crosschecked on page 444 of the book). According to the book, the result above will be gotten if am using php 5.2 or less. But am using php5.4.3, which I belive is php6, which according to the book has unicode support. Have already defaulted my dreamweaver to utf-8 encoding. So pls what could be worng. And one more thing when I call the phpinfo() I can't see section for unicode settings.Pls help out.
  7. People pls help me, am nt still geting this thing. Do I have to make any change in my php.ini file fø̲̣̣я̅ my wamp to surport UNICODE. Am using php 5.4.3., wamp 2.2 to be precise. Pls I need full understanding of this thing, mayb I am missing something in the book. Cos according to the book only php 6(php 5.4) has UNICODE support. §☺ pls what am I missing. Thak you.
  8. Fenks, will try other browsers on my system. Am typing from my Blackberry, the reason for the wierd character.
  9. †ђξ problem here is that, I think there are some setting I need get done that am not getting, I just installed WAMP 2.2 which has PHP 5.4.14, which I belive has unicode support. If †ђξ unicode support where enabled, I will not be getting †ђξ result I posted. Pls help.
  10. This is d code : <?php header ('Content-Type: text/html; charset=UTF-8'); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head> <body> <?php $names = array('joάo','ҐѾργζ', 'Anton', 'KamilÐ', 'FranĞiška','愛子', '杰西卡'); foreach ($names as $name) { echo "<p>$name has ".strlen($name)." characters <br />\n".strtoupper($name)." in capital letters</p>\n"; } ?> </body> </html> The result when i run the code: joάo has 5 characters JOάO in capital letters ҐѾργζ has 10 characters ҐѾργζ in capital letters Anton has 5 characters ANTON in capital letters KamilÐ has 7 characters KAMILÐ in capital letters FranĞiška has 11 characters FRANĞIšKA in capital letters 愛子 has 6 characters 愛子 in capital letters 杰西卡 has 9 characters 杰西卡 in capital letters My phone browser cannot display the chinesse words. Thank u §☺ much.
  11. Ahahahahah, Antonio, it aint drunk am typing from my blackberry. Will turn the symbol thing off now. Pls I jst installed Wamp 2.2, and it came with php 5.4.3. But I still can run the unicode.php example, am getting the fig 14.9 answer. Doesn't php 5.4.3 support unicode. Pls help.
  12. Hello people, pls I need help on dis one. Does Php version 5.4.3 support unicode. Cause after lauching d phpinfo page I can't see the uincode section, like larry screenshot it in the 'Making a Universal site' chapter. Pls help out. Thank u §☺ much, really appreciate
  13. Pls I will like to know what anyone here thinks about †ђξ use of PDO. Have been trying to wrap my head round it, bur it seems like am jst nt getting it. I knw dis is not 'bout this book, bur I jst need to knw. Thanks fø̲̣̣я̅ understanding.
  14. Thanks Margaux, I used usera in my own database. Ãήϑ pls ã†‎ do u mean by code tags ?. Thanks
×
×
  • Create New...