I want to send an Newsletter with PHPMAiler. The newsletter does work, but I'm wondering if there is a better option to do this.
What I have is.
HTML Page
Images
Now my code looks as follows
$mail = new PHPMailer();
//Adding the body
$body = file_get_contents('template/index.htm');
$mail->Subject = "PHPMailer Test Subject via ma...
I have a need to show a select box which will display all categories and subcategories in one go.
I want to show All Categories left most & bold while all sub categories will come under respective Categories but will be indented and Italized.
How can we create such a Select List in PHP?
I have something like this in Magento Ecommerce ...
I'm building a little Twitter thing in PHP and I'm trying to parse URLs, @replies and #hashtags and make them into clickable links.
The @replies would link to http://twitter.com/replies
#Hashtags would like to http://search.twitter.com/search?q=%23hashtags
I've found a class for parsing URLs and I'm wondering if this could also be u...
hi
i want to merge two images in php using GD how can i do this ?
...
Trying to debug PHP using its default current-line-only error messages is horrible. How can I get PHP to produce a backtrace (stack trace) when errors are produced?
...
I'm trying to start building a whole application using phpBB3 user system as a base using CodeIgniter framework. However before starting I would like to hear a piece of advice from any phpBB3 Developer out there.
I've been developing for Wordpress and Drupal. But recently I decided I would build up something fit to my needs instead of u...
I have two < span> -tags with the same id in different places om my page. I know it's wrong to use the same ID twice. It's no problem for me to change the id's to class.
HTML:
<span id="tumme">4</span>
...
<span id="tumme">4</span>
....
is updated by
AJAX:
document.getElementById(tumme).innerHTML = xmlHttp.responseText;
but on...
Hi everybody.
I'm writing a Content Management System in PHP, and I want it to be the smallest one in the world. I'm planning to make it available to everyone, just like Drupal and Joomla. But to make it so ultra-tiny, I change code to smaller code.
For example, I change:
$info = parse_ini_file("info.scm"); /* to */ $i=parse_ini_file(...
I'm interested in some of the design behind Rails ActiveRecord, Doctrine for PHP (and similar ORMs).
How does an ORM manage to accomplish features like chained accessors and how deep are they typically expected to work?
How does an ORM construct queries internally?
How does an ORM manage the queries while sustaining the arbitrary natur...
Following on from :
http://stackoverflow.com/questions/1034360/how-to-save-portlet-positions
I'd like to know how to get the new position of the portlet in the first place.
...
I tried doing this but then it is not working
<?php
if ($_SERVER['SERVER_NAME']=='http://www.testground.idghosting.com/idi' && $_SERVER['REQUEST_URI'] == 'our-production/') {
echo '<div id="services">
<h1>Our services</h1>
<a href="<?php bloginfo(\'url\'); ?>" id="serv_productions" title="Our Productions"><span>Our Producti...
Most email clients have problems reading CSS in HTML emails (including Gmail and Hotmail). I often use this service to convert my HTML/CSS to proper email format so that everything looks normal on the user's end. Basically what it does is convert all CSS to inline styles:
http://premailer.dialect.ca/
Do any of you have any other method...
Is there any way to replace the bundled Apache and PHP install on OS X Server 10.5? I've got them installed separately at the moment, but it'd be nice if I could use the Server Admin tools with them. I know this is a long shot, but figured it's worth it.
...
I'm about to start a new PHP project and I'm going to need to make use of 3rd party forum software.
What's the best way to tackle integration of the forum into my code? Things like user authentication, having the user only have to login once, etc.
I'll be using the CodeIgniter framework if that is of any help. I found the article on in...
I have this code that prints out columns in my DB and adds a column "Profit" for me.
Distance is calculated in a complex way and so is done in a loop, while the transformation of distance to "profit" is done as it is printed out.
What I wish to do is print them out in descending order of "profit". I believe (but do not know) that the be...
Hi all,
I have a problem, I use pcntl_fork to fork a process in PHP,
$pid = pcntl_fork();
if ($pid == -1) {
die('could not fork');
} else if ($pid) {
// we are the parent
pcntl_wait($status); //Protect against Zombie children
} else {
pcntl_exec("/path/to/php/script");
echo "Could not Execute...";
}
I am trying to figure out a w...
I have this bit of code in a .php file:
<?php ec3_get_events(
5, // limit
'%DATE%: <a href="%LINK%">%TITLE%</a> (%TIME%)', // template_event
'', // template_day
'j', // date_format
'<h2>%MONTH%</h2>' ); ?>
The lin...
CakePHP makes heavy use of associative arrays for passing large numbers of parameters to functions. I have not really seen this technique outside of PHP and never seen it used to the extent that Cake uses it. I really like this approach because as it seems it would be easier to handle new parameters in future releases of your own code an...
Hello everyone!
I'm writing Content Management software in PHP (which should not be bigger then 3kb when minified), but what engine should I use for languages (english, dutch, german, chinese, etc...)? I was thinking of creating a function called
function _(){}
that reads strings from a file (a .ini file or similar). But does somebod...
I have a simple PHP page for downloading files that contains this code.
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename="' . $name . '"');
readfile("$file");
This downloads the current bit of music I am listening to in a simple flash player.
For some reason in the latest Safari 4.0
...