Remove text between two HTML comments. Well, one way is to make use of assertions. By using look behind and look ahead assertions (they are not included in any matches), you can grab what is not part of them: $tmp_tpl = preg_replace(‘#(?<=<!–COMMENTBOX–>).+(?=<!–ENDCOMMENTBOX–>)#’, ”, $tmp_tpl); Of course, to test this out, when you say echo $tmp_tpl, …
Monthly Archives: July 2009
Troubleshooting SMTP problems
SMTP or sending mail problems are common and usually easy to troubleshoot. This document will help customers troubleshoot SMTP problems on all (mt) Media Temple hosting platforms. The first step in any troubleshooting procedure is to try to identify and recreate the problem. Use your mail program to send an email messageto a verified working …
Configuring cron jobs on Windows
To setup a Windows machine to run cron.php at a specific time follow the specific instructions below. This can be useful if you are not familiar with Linux/Unix, or if your web host does not offer the ability to run cron jobs; you can run them remotely from your own computer. Note: These instructions were …
Ubuntu Server:Install GUI and Webmin in Ubuntu 8.10 (Intrepid Ibex) Guide
http://www.ubuntugeek.com/ubuntu-serverinstall-gui-and-webmin-in-ubuntu-810-intrepid-ibex-guide.html We have already discussed how to install ubuntu 8.10 LAMP server .If you are a new user and not familiar with command prompt you can install GUI for your ubuntu LAMP server using the 2 options
PHP and XML Sitting in a Tree
There are scores of ways to store, work with, and retrieve data on the web. Simple databases, relational databases, XML, even custom flat files can hold our product catalogs, user information, and other repositories of important stuff that we want to share with the world. There are some logical ways to work with different kinds of …
Short If Statement in PHP
PHP – One Line If Statement – Short If Statement – Condensed If Statement I always have to look this up, so here it is for easy reference. Sometimes is makes the code look less cluttered if you can express and if in one line. The one line if statement is also known as the ternary …