background preloader

PHP

Facebook Twitter

Sending Emails with the Zend Framework. Many PHP applications require the ability to send emails nowadays from simple plain-text emails confirming a registration to advanced HTML newsletters. PHP allows us to send emails using the mail() function but this can quickly get complex when you begin to add HTML, attachments and different character encoding. Luckily for us developers, the Zend_Mail component from the Zend Framework greatly simplifies the process by providing easy-to-use methods for creating and sending emails. This article will walk you through creating and sending plain-text and HTML emails, adding attachments, multiple recipients and much more.

To use the Zend_Mail component you will first need to download the Zend Framework. Visit the Zend Framework download page and download the newest version of the Zend Framework (1.5RC1 at the time of writing). Once downloaded, unzip the Zend Framework archive to your Desktop or Home folder. The folder we are interested in is the folder. PHP Code: <? Set_include_path . . Alan' Lorenzo Alberton - Articles - Zend Framework, mod_rewrite and pu.

At a glance A quick tip on how to deal with Zend Framework directory structure and the public document root directory in most shared hosting accounts, using mod_rewrite and an .htaccess file. Permalink Latest articles Here's a short tip for those who need to publish a Zend Framework project on a shared hosting. 1.projectname/ 2. application/ 3. controllers/ 4. views/ 5. scripts/ 6. library/ 7. public/ 8. tests/ The public directory contains all the files that should be directly accessible via the web server, so you must set your web server's document root to this directory. To solve this problem without changing the above directory structure, you can remove the .htaccess file from the public directory, and place this one in the root directory instead: 01.RewriteEngine On 03.RewriteRule ^\.htaccess$ - [F] 05.RewriteCond %{REQUEST_URI} ="" 06.RewriteRule ^.*$ /public/index.php [NC,L] 08.RewriteCond %{REQUEST_URI} !

09.RewriteRule ^(.*)$ /public/$1 11.RewriteCond %{REQUEST_FILENAME} -f Lorenzo Alberton Tags. AMFPHP | Zend AMF service for connecting to Wordpress. For a project I have in development I needed to once again create or connect to a CMS. I’ve previously rolled my own CMS using AMFPHP, which works fine. However, I thought I’d give using WordPress a go as a CMS system for Flash sites, with an AMFPHP connection between Flash and the wordpress database. I stumbled on Amfphp WordPress Integration (AWI) which seemed to offer what I was after.

However, it has not been updated for a long time, and supports wordpress 2.3 or so and below. The project I have on needs to take advantage of wordpress’s tagging and categorising of content, which was the main element missing from the awi project. So, I re wrote it, and added in many more methods and dropped many of the existing ones. You can view an example of it at work here: Which is using a hacked version of the WP-Cumulus WordPress plugin, from here: Anyway, enough rambling, you can download the latest version (0.6) here; Hypertext Preprocessor. 10 Essential PHP Code Snippets You Might be Looking For | DevSni. PHP is a scripting language that is perfect for developing dynamic web pages and applications. Being one of the most popular scripting languages on the internet today, makes it pretty easy to get started with.

If you are looking for a technique that you forgot about, or a function you didn’t know someone else has created before; then this article might be something useful for you and will save you some time for sure. Today we will highlight 10 Essential PHP functions with step by step tutorials to get you some of the latest techniques used these days. 1. Using PHP to Backup MySQL Databases If you website stores its data in a MySQL database, you will most definitely want to backup that information so that it can be restored in case of any disaster (we all have been there). There are different ways to backup your MySQL Database, but today we will only focus on how to use PHP to backup your MySQL database. Different Ways to backup your MySQL database: 1. Source Further Resources 2. Source 3. 4. How To Install Zend Framework.

The next step after learning the syntax of a language is to learn to use libraries and frameworks for that language, this is where am at right now, so today am going to show you how to install Zend on your shared hosting plan because am pretty sure that the majority of the people start off with this type of plan. This tutorial is also be the first tutorial of our Zend tutorials. The first thing you have to do is download the framework, you have to make an account but it’s free so don’t worry.

We are going to be using the full package download ( ZendFramework-1.8.0 ). Okay, so now that you have downloaded and extracted the contents rename the folder “ZendFramework-1.8.0″ to simply “zend” so that we are on the same page, and don’t worry you’ll be able to change this later. The next thing we need is your document root folder which can be obtained by uploading a php file with the following contents. echo $_SERVER['DOCUMENT_ROOT']; That’s it!