News Feed
Sections
News Archive


Community Events
php|tek 2008 PHP Conference



feed this:

DevShed:
Building File Uploaders with PHP 5
0 comments :: posted Thursday March 20, 2008 @ 11:18:11
voice your opinion now!

On DevShed today there's a new tutorial showing how to build file upload functionality into your scripts.

If you're a PHP developer who has built a certain number of web applications, then it's quite probable that you've already worked with HTTP file uploads. [...] First I'm going to teach you how to handle file uploads using a procedural approach, and then, with the topic well underway, by way of the object-oriented paradigm.

The introduce the beginners out there to the $_FILES array (a superglobal) that contains the details about the file(s) that have been submitted. Next comes the construction of a simple form and how to handle the submission on the PHP side.

tagged with: file upload php5 tutorial beginner files superglobal form


Stoyan Stefanov's Blog:
PHP-style $GLOBALS in Javascript?
0 comments :: posted Wednesday March 12, 2008 @ 07:55:07
voice your opinion now!

In a new post to his blog today, Stoyan Stefanov has a proposal to being something PHP users are very used to - superglobals - over to Javascript.

Javascript has implied globals. When you skip the var in var a = 1; and go a = 1;, then a becomes a global variable. Some consider this an error in the language. [...] In PHP on the other hand, variables are local. [...] So how about this: adopt the $GLOBALS convention in your JavaScripts?

His example proposes the creation of a GLOBALS object you can assign properties to that can be used anywhere. This helps to keep the variables you truely want to be global contained, though it doesn't do much except provide a convention.

tagged with: superglobal global variable javascript

Brian Moon's Blog:
Responsible use of the $_REQUEST variable
0 comments :: posted Tuesday January 22, 2008 @ 09:38:00
voice your opinion now!

In one of his recent blog entries, Brian Moon takes a look at what he considers the "proper use" of the PHP superglobal $_REQUEST (as brought on by a thread on the PHP internals mailing list.

I have seen more than one person make the following logic mistake: I may get data via GET, I may get data via POST - Ah, I should use $_REQUEST as it will catch both.

Brian points out the error - cookies aren't in $_REQUEST so improper handling of those values could lead to cookie data overwriting GET/POST data from $_REQUEST. Several of the comments on the post also warn against improper handling of the values, noting that doing so could lead to holes open for attacks (like session fixation).

tagged with: get post request superglobal cookie security merge

PHPBuilder.com:
Fundamentals of PHP Superglobals
0 comments :: posted Friday October 19, 2007 @ 13:56:00
voice your opinion now!

PHPBuilder.com has a new article published today that works through some of the basics behind using the superglobal variables in PHP.

This month's article is aimed at PHP developers who're not yet familiar with the PHP superglobals. Usage of superglobals is fundamental to PHP web development, but, with all the recent changes in PHP, there are still many outdated tutorials, books, and sadly, still much confusion.

They look at how to use them in a PHP script (in an HTML page) and what's contained in each of them (_GET, _POST, _ENV, _SERVER, etc).

tagged with: superglobal fundamental tutorial basic beginner superglobal fundamental tutorial basic beginner


job PHP5 pecl book PEAR cakephp code mysql zend database conference releases framework zendframework developer release security application package ajax

All content copyright, 2008 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework