Web developers have to deal with generating PDFs (invoices, money receipts, bills, etc) as part of web development. And most cases it is not tough to do but it is quite irritating. In a few cases, it may really difficult. Developers have to spend a lot of time and effort to generate PDFs similar to…
Using CakePHP Logging Scope
Undoubtedly logging is most important part of an application to debugging, analyzing, measuring performance. So often times we want to handle different logging behavior for different components of our application. Assume that you are developing an e-commerce website and you want to handle logging cart & payment component differently. So in that way, each log of the different…
Array Chunk based on Key Value in PHP
Sometimes programmer needs to chunk or grouping array based on the array key value. Look at the below code snippet, here I have a multidimensional array, and I want to group all same elements of each category. OUTPUT: array ( ‘php’ => array ( 0 => array ( ‘category’ => ‘php’, ‘post_id’ => 100, ), 1…
Depreciation Notice Error in Phpmyadmin With Ubuntu16.04
If you see the error notice properly you can understand what does it means. This error notice means some of your PHP has old constructors. So if you replace these old constructors with new constructor then the problem will be solved. To do this, open streems.php file by this command. sudo gedit /usr/share/php/php-gettext/streams.php StringReader…
How to Recursively Delete a Directory and its Entire Contents Using PHP
Here is a script for recursively delete a directory and its entire contents using PHP
CakePHP Auth Allow to Specific Actions of Specific Controllers
It’s a common problem to CakePHP developer to auth allow to specific actions of a specific controller. Especially to newbies developer of CakePHP. Honestly, it’s really easy but little tricky. So this article is for whom, who looking for CakePHP auth allow to specific actions of specific controllers.
Catch PHP Output Buffering Data Over jQuery AJAX
From last few day’s I was deeply engaged with Output Buffering. I had to catch PHP output buffering responsive over AJAX request. And now I am here to sharing a sample script to catch PHP output buffering data over jQuery AJAX.
Upload File Using cPanel API
cPanel is a web hosting control panel which is using for various aspects of website and server administration with a nice graphical interface. cPanel also has well-documented APIs to manage all kinds cPanel activities through API. Here I have shared a code snipped to uploading files using cPanel API. (Fileman::upload_files)
Parsing XML With Multiple Namespaces Using PHP
Yesterday, I had a very ugly XML data which had to parse. It has multiple namespaces and namespaces are irrelevant with DOM – I just wasn’t getting the nodeValue from the Element. It was parsing partially not all nodeValues due to namespaces are irrelevant with DOM. Then I applied little tricks onto it through XML children…
Remove Default Search Box and Add Custom Box in DataTable
DataTable displaying a default search box while initializing it. So by default DataTable has a search box. But sometimes you might have to remove that default search box and add a custom search box. And place that somewhere in the page. This article will help you to do that. $(‘#example’).DataTable(); See the above snippet, If your DataTable…