News Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

DevShed:
Displaying User Comments in a Code Igniter Blog Application
December 23, 2008 @ 11:42:01

DevShed continues their series creating a simple blogging application with the CodeIgniter framework with this part of the series - adding in a display for user comments.

In this specific case, the first of these files was defined as a basic controller, and was provided with the ability to paginate the aforementioned blog entries via the corresponding pagination class included with CodeIgniter. However, in its current incarnation, the blog application is pretty limited. It doesn't let users post comments on each blog entry. Thus, in the next few lines I'll be improving the signature of the controller class to address this important issue.

The review the code from before (showing the pagination of the blog entries) and add onto it a new comments method and how to create a new view to show the messages visitors to the site have submitted.

1 comment voice your opinion now!
blog application tutorial codeigniter user comment display view action


Nessa's Blog:
Using PHP to Display Version Info (I and II)
October 19, 2007 @ 11:23:00

Nessa has two posts that talk about how to use PHP to display the versions of software running on the local machine.

I've been working on this application for work that does some simple server reporting, part of which involves displaying the versions of major software running on the machines. [...] I need to be aware of this to make sure that customers are being moved to servers with compatible versions. It's also good in tracking and planning upgrades.

In the first post she recommends using the exec function in PHP to run system commands to get things like the cpanel version, python version and what perl you have installed.

Part two shows a little bit different way to get some of the same information - using the data in the /proc/version file as a single resource to get OS information.

0 comments voice your opinion now!
display version information exec proc version file display version information exec proc version file


Stefan Mischook's Blog:
Turning on display_errors in WAMP - Video Tutorial
August 31, 2007 @ 07:55:00

Stefan Mischook has posted another video tutorial to help developers get started in their PHP travels. This time it covers how to turn on errors when using the popular WAMP installation package.

Within a WAMP installation, I ran into a little issue today when trying to change php.ini's 'display_errors' property. By default WAMP installs with 'display_errors' to 'Off' - This is a pain-in-the-ass setting when trying to write new PHP code because errors don't get displayed in the browser window

He includes the solution in the post but links as well to the video tutorial to show you exactly how it's done.

0 comments voice your opinion now!
wamp video tutorial enable error display wamp video tutorial enable error display


DevShed:
Working with PHP and MySQL
May 29, 2007 @ 09:31:00

DevShed has a new tutorial today that's part two in a series looking at working with the combination of PHP and MySQL - "Working with PHP and MySQL".

You'll learn how to select the database, fetch and display data, and more. This article is excerpted from chapter 9 of Learning PHP and MySQL, written by Michele Davis and Jon Phillips.

They start by selecting the database before moving on to the query. With a select query, they grab the information from the books tablw and display it out to the page (fetching with both a mysql_fetch_row and mysql_fetch_array).

1 comment voice your opinion now!
mysql tutorial select database fetch display mysql tutorial select database fetch display


JSLabs Blog:
How to write an image gallery script in PHP
December 13, 2006 @ 07:10:10

On the JSLabs Blog today, there's a quick new tutorial showing how to create an image gallery script to show off your latest photos and other images to the world.

This is a simple yet useful tutorial on how to write an image gallery script in PHP. It could be used for anything from banner rotation to just a couple of images that you would like to display in rotation on your website.

The code is broken up into two functions - GetAllFiles (grabs the files from the current directory) and DisplayImages (outputs the HTML to display and organize the images). The script doesn't require any external libraries and the functionality in it works with PHP 4.3.0 and above.

It's nothing fancy, but if you need a script to show the images in a directory (it can tell the difference between image and non-image), check this out.

0 comments voice your opinion now!
image gallery script display directory file html tutorial image gallery script display directory file html tutorial


DevShed:
Handling Entries for a Blogger Built with PHP
November 28, 2006 @ 09:58:00

DevShed has posted the second part of their (three part) series looking at the construction of a blogging application in PHP5. In this part, they look at how to handle the user's desire to input entries into the application via a HTML form.

In this second installment of the series, I'll show you how to expand the initial functionality of the already familiar "BlogProcessor" class so that it is capable of addressing all these (displaying all the entries, show the insert/update forms) issues.

They start with the simplest of the group - the displayBlogs method, outputting the full contents of the entries for the blog. Things get a bit tougher with the next step - creating the insert and update forms for pushing content into the database. Finally, they defined the header and footer functionality to make setting up the structure of the page simpler.

0 comments voice your opinion now!
part2 blog tutorial insert update form header footer display part2 blog tutorial insert update form header footer display


Ryan Malesevich's Blog:
iTunes Stats for Macintosh with PHP & MySQL Part 2
August 14, 2006 @ 10:55:41

Ryan Malesevich is back today with part two of his "iTunes Stats for Macintosh with PHP and MySQL" series, building on the groundwork laid in part one.

As promised I'm back again the second and should be the last part for the iTunes stats with PHP & MySQL. In the previous section I covered how to get your iTunes information from iTunes into a MySQL database. Since I didn't get any questions about it I can either assume that no one cares or no one had any troubles.

This part is not exclusive to a Mac, you can write your PHP scripts with any operating system that you want. So if you're not on a Mac but has a friend who does then you can send your friend your iTunes XML file and your friend can export the data for you. Let's get stated shall we.

Since in the first part of the series, he showed how to put information into the database, he shows in this second part how to get things back out. There's code samples for connecting to the database, the SQL to grab all of the data out from the table and echo out the information inside. He also links to his stats as an example.

1 comment voice your opinion now!
itunes stats part2 macintosh display database play count itunes stats part2 macintosh display database play count


Zend Developer Zone:
Consuming Google Calendars with the Zend Framework
April 26, 2006 @ 16:54:11

Hot on the heels of the recent Google Calendar release, the Zend Developer Zone has posted a quick tutorial on using the Zend Framework to consume the data the calendaring service provides.

A couple of weeks ago, Google jumped into the online calendar space by launching Google Calendar (um, beta). The application is chock-full of Ajaxy goodness and plenty of features, but I'm here to talk about what you can do with your calendar data behind the scenes. Using some handy tools from the Swiss Army Knife that is the Zend Framework, I'll show you how to pull data from your Google Calendar into your site. Just for kicks, I'll also throw in a caching layer to keep things fast and reduce the network traffic between your server and Google.

The framework makes the script simple, a matter of pulling in the feed with the Zend_Feed module and caching it with Zend_Cache. The example grabs the latest data from the RSS feed, parses it into values to store in a server-side cache (in /tmp) and loops through each item to display the relevant event details.

0 comments voice your opinion now!
zend framework google calendar feed rss cache display zend framework google calendar feed rss cache display


Ilia Alshanetsky's Blog:
Another unserialize() abuse
March 23, 2006 @ 06:59:23

With yet another reason not to trust the users of your application (mainly the data they send you), Ilia Alshanetsky has details on an issue that could be caused by the unserialize() function in PHP.

While talking with PHP developers this morning I thought of another way unverified serialized strings could be abused. This exploit can only affect PHP 5 installs though, but given the growing market share of PHP 5 it is certainly something worth noting.

As you may know classes in PHP are allowed to implement a magic method called __wakeup() that contains operation that are to be performed when a class is deserialized. Some native classes like PDO implement this function with a goal of preventing database serialization and throw an error when it is used.

He uses an example with PDO and a string of a serialized "supposed PDO object" to illustrate how, without the proper handling, it could lead to a fatal error in the script. The end result of the fatal error, if displaying errors is still on, could be that somewhat sensitive information could be displayed to the viewer.

0 comments voice your opinion now!
unserialize abuse __wakeup fatal error display unserialize abuse __wakeup fatal error display


DevShed:
User-defined Interfaces in PHP 5 - Turning MySQL Classes into Interface Implementers
January 02, 2006 @ 16:18:06

DevShed has posted the third part of their "User-defined Interfaces in PHP5" series today, this one focusing on the conversion of MySQL classes into interface implementors.

Returning to this part of the series, I'll demonstrate how useful interfaces can be, by implementing the "HTMLRenderer" interface on a couple of MySQL processing classes that have nothing in common with the (X)HTML widgets explained in the previous tutorial. In this way, by the end of this article you'll have a decent background for working with interfaces as well as a clear idea about its concrete implementation in PHP applications.

By using the code generated in the previous tutorial of the series, they show you how to use it in a more real-life situation, rendering the results in an HTML automatically...

0 comments voice your opinion now!
user-defined interface mysql implement display HTML table user-defined interface mysql implement display HTML table



Community Events





Don't see your event here?
Let us know!


example package introduction podcast voicesoftheelephpant tool community series version opinion framework library security laravel language list symfony composer conference interview

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