Month: July 2018

wordpress

Template is missing. Standalone themes need to have a index.php template file. Child themes need to have a Template header in the style.css stylesheet.

In WordPress themes showing error like : Broken Theme as below : Template is missing. Standalone themes need to have a index.php template file. Child themes need to have a Template header in the style.css stylesheet.   This is because of your child theme missing,  Template Name is missing from the style.css Add this line…

Jquery & Javascript

Click function display and hide a div with jquery

How to show/hide div content on click event (jquery)? $( document ).ready(function() { $(‘.searchbutton’).click(function(){ $(“.searchbox”).toggle(); }); });

Amzon s3 and Php

How to create a instance of aws s3 class to upload files using php?

if (!class_exists(‘S3’)) require_once ‘s3.php’; // include s3.php file if (!defined(‘awsAccessKey’)) define(‘awsAccessKey’, ‘keyhere’); //awsAccessKey key here if (!defined(‘awsSecretKey’)) define(‘awsSecretKey’, ‘secretkey here’); //secret key $bucketName = “bucketname”; // bucketname if (!extension_loaded(‘curl’) && !@dl(PHP_SHLIB_SUFFIX == ‘so’ ? ‘curl.so’ : ‘php_curl.dll’)) exit(“\nERROR: CURL extension not loaded\n\n”); $s3 = new S3(awsAccessKey, awsSecretKey); For more deatils : https://www.pgs-soft.com/blog/how-to-store-and-manage-files-on-amazon-s3-with-php-class/

Php

Difference between parse error and fatal error in php?

Difference between parse error(syntax error) and fatal errors: Parse error or syntax error occurs if any syntax mistakes in code, example missing braces, semi column, quotes etc.. Fatal error occurs when we try to call any function that is not exist. Both errors stop the execution of program and shows the errors. Warning and notices…

Amzon s3 and Php

How to create and access buckets in amazon s3?

How to create and access buckets in amazon s3 with php? In amazon s3 storage, files(objects) are stored inside buckets,we need to create buckets to store the objects. To create buckets s3 provide different API, that is we can create buckets within code itself. Or we can create the buckets from s3 console itself. We…

Amzon s3 and Php

What is amazon s3?

Amazon s3 or simple storage system is storage service by aws. Here files are stored as objects. Objects are stored in buckets. so we need to create buckets first and then store objects inside it. we can assign the accessibility (ACL) to objects as private or public. public objects will be accessible to all. Private…

Php

Difference between require and include

Difference between require and include in php: require(‘filename’) includes the file we specified , while executing, if any error occurred, it produce a fatal error and stop execution of the code. include(‘filename’) include the file, while executing the same, if any error occurred, produce a warning and execute the reaming code. require(‘filename’) and require_once(‘filename’) require_once…