Dynamic Web Pages: deutschsprachiger PHP Knotenpunkt seit 1999

Dynamic Web Pages : tutorials _


PHP QuickRef

Via QuickRef gelangen Sie direkt zur gesuchten Funktion im Handbuch.



Das PHP Magazin erscheint 2-monatlich zum Preis von 9,80 €. Studenten erfreuen sich über ermäßigte Abos.

Das PHP Journal erscheint 2-monatlich zum Preis von 14,95 €. Studenten und Abonnenten erfreuen sich über bis zu 25% Ermäßigung.

PHP Solutions Magazin
Das PHP Solutions Magazin erscheint alle 3 Monate zum Preis von 8,75 €. Studenten erfreuen sich über ermäßigte Abos.

Der php|architect erscheint monatlich als digitale PDF-Version zum Preis von $3,99 USD und als Print-Version zum Preis von $8,69 USD. Im Abo gibt es Rabatt (30% Print, 15% PDF).

Tutorials: Datum und Zeit
Tutorial in dieser Kategorie hinzufügen
British date format parsing (1475 Zugriffe)

During the PHP London conference (slides are here as usual), a number of British people were "complaining" that PHP's strtotime() and date_create() /new DateTime() functions do not understand the British date format "dd/mm/yyyy". Historically, the "English" text to date parsers in PHP only accept the illogical American format of "mm/dd/yyyy". Having seen this problem before, I recently added a new function/method to PHP's Date/Time support to address exactly this issue.

Tutorial kommentieren  Defekten Link melden

Timezones in MySQL and PHP (876 Zugriffe)

Timezones in web applications are often dealt with the same way as character sets. Either incorrectly or ignored. The case of unicode is improving slowly as developers discover the need for international language support.

The problem with not handling timezones correctly is not apparent in the usual case of the webserver and the database server being in the same timezone. A lot of PHP code passes the task of timestamps on to MySQL, e.g. by calling NOW() on inserting or updating records. It is nessesary to know in what timezone the timestamps are stored to process them correctly.

Often a specific timezone is assumed for displaying date and time. This could very well be incorrect for a large number of visitors. If the database server is in yet another timezone, things begin to get out of sync.

MySQL's handling of timezones is - obviously - separate from that of PHP. Along with the fact that the MySQL timezone can only be changed by users with SUPER privileges, this means that MySQL cannot be relied on for creation of timestamps in correct timezone. In other words, the usual call to NOW() is not an option.

Tutorial kommentieren  Defekten Link melden

Get the correct time by converting between time zones with PHP and PEAR (1583 Zugriffe, 2 Kommentare)

PHP comes with an extensive catalog of date and time functions, all designed to let you easily retrieve temporal information, massage it into a format you require, and either use it in a calculation or display it to the user. However, if you'd like to do something more complicated, things get much, much hairier.

Tutorial kommentieren  Defekten Link melden

Rehan schreibt:
Извините, но мне кажется вы меня не поняли. Объясните пожалуйста. Вот на площадке на всех страницах разрешено размещение только 1 ссылки. Как организовать показ ссылки по выбору оптимизатора в виде блока или в виде ссылок?Ведь вебмастеру в данном случае остается выбирать либо блок, либо обычная ссылка.Или можно в одно и тоже место поставить rtuern_links() и rtuern_block_links() и оптимизатор сможет выбрать тип размещения на странице?Прошу обратить внимание, что на страницах только 1 место для размещения.

Jamesjay schreibt:
חומד, אם כבר משנים את העבודה שלי ונותנים לי עליה קרדיט, לפחות מוטב שלא לעוות אותה באמצעות שינוי קלוקל של פרמטרי אורך-רוחב, וגם לדאוג שלא יהיה שם tiling מכוער שכזה :Dוברכות לרגל זניחת הקאפצ'ה המזורגגת.להגיב

A DIY calendar control in PHP (1087 Zugriffe)

As a former ASP.Net coder, I've missed the convenience of Microsoft's built-in Calendar Control since I switched to doing Web site development in PHP. On a recent project I needed the ability to display a calendar with dates serving as hyperlinks to selected database items. I decided to use the opportunity to write some portable PHP code that I could use in other projects.

Tutorial kommentieren  Defekten Link melden

Get the correct time by converting between time zones with PHP and PEAR (1137 Zugriffe)

This tutorial will teach you how to convert temporal values between time zones with the PEAR Date class. It assumes that you have a working Apache and PHP installation and that the PEAR Date class has been correctly installed.

Tutorial kommentieren  Defekten Link melden

Handling dates and times in PHP & MySQL (1590 Zugriffe)

This article will show you how to use dates and times in PHP & MySQL, by taking a look at the problems that arise when handling dates and times, and how to solve them

Tutorial kommentieren  Defekten Link melden

Calculating difference between two dates using PHP (2330 Zugriffe)

Suppose you want to know the age of a person given her birth date. Lets say her birth date is "09-23-1969". Although in this case you might say that we dont need a program to compute the age, but assuming there are 1000s of records in your database...

Tutorial kommentieren  Defekten Link melden

Practical Date/Time examples with PHP and MySQL (4054 Zugriffe)

In this article Mauricio shows us some examples of how to use the date/time features with MySQL and PHP including the UNIX timestamp and the PHP date_diff() function.

Tutorial kommentieren  Defekten Link melden

Creating and using a timing class (1995 Zugriffe)

The purpose of this tutorial is to talk about two seperate concepts; profiling and object oriented programming (OOP). In this tutorial we'll create a simple class to allow you to create one or more timers. You can then use these timers to show you how long a script or function takes to run, which can help you determine what portions of your script are eating up the most processing time. This is sometimes referred to as profiling. You can also use timer objects to provide generic timer display in your scripts.

Tutorial kommentieren  Defekten Link melden

On User-Defined Timezones in PHP (3090 Zugriffe)

PHP provides some nice date manipulation functions that work very well in combination with each other. However, they only handle dealing with the server's timezone. Adding the feature for shifting dates to a user-defined timezone can be a very unpleasant experience, as we know first hand. In this article, we discuss the problems we encountered, and present our solution.

Tutorial kommentieren  Defekten Link melden


Folge DynamicWebPages!

PHP News als RSS abonnieren ...
Auf Twitter folgen ...
Fan werden auf Facebook ...


PHP Newsletter

Bleiben Sie immer "Up-To-Date" mit unseren Newslettern!

PHP Newsletter
PHP Trainingsletter


PHP Releases



powered by Hetzner

top Alle Rechte vorbehalten. © Dynamic Web Pages 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 top

  Seitenaufbau in 0.041 Sekunden