Category: PHP Frameworks
Taking Database Backup And Moving that backup from one server to another using PHP
While working on two servers, we can take the backup of database on one server using mysqldump command in php. Example : exec(‘mysqldump –host ‘.$dbhost.’ –user ‘.$dbuser.’ –password=’.$dbpass.” “. $dbname.’ > ‘.$dbname.’.sql’); After creating dump of database, user can move
Scaffolding in CakePHP
Scaffolding in CakePHP Application scaffolding in CakePHP is a technique that allows the developer to define and create a basic application that can create, retrieve, update and delete objects. Basically CRUD (create, Read, Update, Delete) data operations are common in
Add virtual field in cakephp 2.* in find methods
How to specify an extra field (not existing in the table) while fetching data from database using find method? Solution is explained below. Assign value to virtual field before find function call: $this->virtualFields[‘virtual_field_name’] = ‘any value’; Use virtual field in
Allowing PHP cURL to access self-signed websites without verifying the SSL certificate
By default, each cURL request can access only SSL certified websites. However, at times it is required to access those sites which are self-signed. To verify that your cURL request is able to access self-signed websites or not, use below
WordPress | Developing Custom scheduler in WordPress
Suppose you want to design a custom scheduler in wordpress plugin instead of using wordpress scheduler which has fixed values of recurrence which are ‘hourly’, ‘twicedaily’,’daily’. And if you want to make the scheduler dynamic instead of making it static
PHP | Only first word showing in textbox from assigned sentence
Problem: After the first space in the string no data appears in the input field. There is an issue when a string contains words with spaces and we want to display the whole string in an input field but after
Adding custom merge tags to the Gravity forms
Merge Tags in gravity forms are the tags that are used to dynamically populate the field values in the form content in gravity forms like IP address, browser name, logged in user name etc . There are many merge tags
WordPress | How to retrieve query variables in plugins
Suppose the URL contains query string for example www.mywebsite.com/sme_page?q=12 then the value of query variable can be retrieved in PHP using the get method such as: <?php echo $_GET[‘q’]; ?> While creating a plugin for WordPress, to retrieve a
CakePHP 3.x | How to change URL of your website to hide controller/action name
Requirement: While running the website in browser, the url path shows controller name followed by the action name and parameters list. In that case the url looks like: www.xyz.com/User/showDetails/ We may come across two types of requirements. Displaying only the