I am currently debugging a script that constantly runs into OutOfMemory exceptions. It is run as a cronjob and usually runs fine, but when the cronjob wasn’t run for a while (for whatever reason) the script has to handle to many elements that queued up and will run into a OutOfMemory exception. From exa…
Tag: php
Print Currency Number Format in PHP
I have some price values to display in my page. I am writing a function which takes the float price and returns the formatted currency val with currency code too.. For example, fnPrice(1001.01) should print $ 1,000.01 Answer The easiest answer is number_format(). If you want your application to be able to wor…
What can be the best Practice for a Rapid Web Application Development?
I am coming up with a web application which will be primarily based on PHP. I would like to know some of the best practices and technologies that I can make use of to come out with the app as fast as possible. My team will be working remotely, so I want to know the best ways of collaborating through
How can I make short random unique keys, like YouTube video IDs, in PHP? [closed]
Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 5 years ago. The community reviewed whether to reopen this question 3 months ago and left it closed: Opinion-…
php class to inline css styles?
I was over at MailChimp’s css inliner http://www.mailchimp.com/labs/inlinecss.php and I was wondering if there are any classes out there that can do this, I’d love to have it in my email code instead of going all the way over to MailChimp. Basically I’m looking for the code, behind the page …
How can I secure my plugin so only paying users can use it?
I’m developing some (wordpress) plugins and I’m planning to have a license fee for whoever want’s to use it. Therefor I need a way to make sure that this plugin is not uploaded to a server where anyone can download it and use it for free. So I was thinking of using an API key. Valid API key …
“SMTP Error: Could not authenticate” in PHPMailer
I’m using PHPMailer in a Simple Script For Send Email’s Through Gmail, and I’m getting an “Unknown Error” (At least for me!): SMTP Error: Could not authenticate. Error: SMTP Error: Could not authenticate. SMTP server error: 5.7.1 Username and Password not accepted. Learn more at …
how to start ob_start inside a class?
im doing a little reasearch about minimalizing the html from php. like the problem is how do i call this ob_start(function) ? can we do like ob_start($this->compresssor()) ? ( ok i know it fails ) inside a class? anyone ?? Thanks for looking in. Adam Ramadhan Answer PHP uses an array(instance,function) rep…
How to add thumbnail to an article in Joomla?
Is there any extension that helps me to add a thumbnail manually to an article? Not those exts which do it on the fly using the first image in the article. I want to add it manually. Answer See related question. Look at there 2 components, you can achieve pretty much the same thing: K2 ZOO, from Yootheme I wa…
How to echo in PHP, HTML tags
I went through this before posting: How can I echo HTML in PHP? And I still couldn’t make it work. I’m trying to echo this: But I still can’t find a way to make the tags “” and ” disappear. What do I have to do? Answer Just put it in single quotes.