Nori gauti straipsnius el. paštu - Prenumeruok

PHPArch 2005, rugsėjis

« »

Dar vienas mėnesiukas ir dar vienas PHP architekto numeriukas. Mano nuomone šis numeriukas per daug neįpatingas, bet mini apžvalga leis jums nuspręsti. Stipriai dar nestudijavau ir kažkaip nėra laiko versti tad nepykite jad beveik viskas orginalo kalba.

Input filtering, part 3


 This month’s installment of Tips & Tricks concludes the series on filtering input, providing practical examples and helpful tips to filter input using regular expressions, test for the length of data, and ensure acceptable values.

Saugumo skyrelis “Input filtering, part 3”, beveik nieko naujo, bet visdėlto beveik. Aprašytos “Character Type Functions” funkcijos ir jų panaudojimas duomenų apdorojimui.

PHP manualas:
The functions provided by this extension check whether a character or string falls into a certain character class according to the current locale

Pagal manualą vienas iš pavyžių:

<b>PHP manualas:</b><br />&lt;?php<br />$strings = array('AbCd1zyZ9', 'foo!#$bar');<br />foreach ($strings as $testcase) {<br />&nbsp; &nbsp;if (ctype_alnum($testcase)) {<br />&nbsp; &nbsp; &nbsp; &nbsp;echo "The string $testcase consists of all letters or digits.n";<br />&nbsp; &nbsp;} else {<br />&nbsp; &nbsp; &nbsp; &nbsp;echo "The string $testcase does not consist of all letters or digits.n";<br />&nbsp; &nbsp;}<br />}<br />?&gt;

Atsakymas:

The string AbCd1zyZ9 consists of all letters or digits.<br />The string foo!#$bar does not consists of all letters or digits.

 

Roll Your Own Database Abstraction Module


 You may already use database abstraction in your applications, perhaps through one of the available data-base abstraction layers, such as PEAR::DB, or PDO (see the PDO article in this issue), but what about various idiosyncrasies in the actual SQL? Perhaps you’ve never even considered this problem. This article will help you the data abstraction beast.

An Introduction to PDO


 A common complaint of the anti-PHP “expert” is the lack of a bundled, uniform database access component. With the advent of an improved object model, in PHP 5.0, a few of PHP’s core developers decided that the time has come to fill this hole with PHP Data Objects (PDO). The package, itself, has been in PECL for quite a while, now, but with the upcoming release PHP 5.1, PDO will be bundled in the main PHP distribution. What does it do? How does it work? One of PDO’s main developers, Ilia Alshanetsky, explains.

 What Are Trackbacks And Why Do They Exist


 if you’ve been around the internet for any length of time, chances are you’ve seen a weblog. Chances are, if you’ve seen a weblog, then you’ve seen a trackback. You might not have known it at the time or even understood what it was, but more and more of the blogging tools out there are using them. So, what are these elusive trackbacks and why do they even exist?

End-to-End Testing with PHP and Internet Explorer


 Automated testing can greatly improve the quality of your product. In this article, Oz presents a framework for creating automated tests that can simulate end-user activity. By leveraging the full faculty of Internet Ex-plorer, these tests can do just about anything that your users can do.

 Test Pattern: State of Confusion

Bug-free code is code you can understand completely. Unfortunately, it doesn’t take much to cause us uncertainty. Even a small amount of complexity will place demands on our memory, and our memory is extremely limited. If we tax our brains, we will get bugs. Marcus Baker examines how the number of bugs in a piece of code can be correlated to its readability.

 

Leave a Reply

Your email address will not be published. Required fields are marked *

> home
  • Apie mane
  • Apklausos
  • Blogas
  • Lietblogs Search
  • Nuorodos
  • Reklama mano bloge
  • Search
  • Tags
  • Testas
  • Projektai
  • Kontaktuok
  • Archyvas