PHP | better way to include a file

| By Webner

Have a look at this folder structure: Test Folder1 Abc.php Folder2 Qwerty.php Now in Abc.php file, try to include Qwerty.php using the following code: Abc.php include(‘../Folder2/Qwerty.php’) It will give this error: Fatal error: Failed opening required ‘../Folder2/Qwerty.php’ (include_path=’.:/usr/local/lib/php’) in /Test/Folder1/Abc.php

PHP | How to install CakePHP 3.0

| By Webner

These are the steps to install CakePHP 3.0 on Ubuntu machine: Make sure you have PHP 5.5.9 (CLI) or higher installed. Check php version on your system using this command: php -v Run the following commands: 1. Download the composer

Introduction to Heroku

| By Webner

Heroku is an all-in-one cloud based platform which allows software developers to develop and host applications over Heroku cloud. The company was setup in June 2007 which initially supported Ruby programming language. Later on, support for other programming languages such

Salesforce | Please use TLS 1.1 or higher when connecting to Salesforce using https

| By Webner

Salesforce login via PHP Salesforce Toolkit API may throw this exception: Please use TLS 1.1 or higher when connecting to Salesforce using https The reason is Salesforce has provided customers with the Critical Update feature Require TLS 1.1 or higher

How to access Moodle files outside the Moodle?

| By Webner

We can access Moodle outside the Moodle (without login) by passing token in the URL. For example : http://localhost/Moodle_new/webservice/pluginfile.php/26/qtype_match/subquestion/17/5/6/PineApple.jpg?token=6yhg9331af9d9284abb36cyjh0c67114a If token is not be passed into the URL, then it redirects to Moodle’s login screen.

CakePHP bake: SQLSTATE[42S02]: Base table or view not found

| By Webner

While running cake bake command for cakephp 3.0 we got the following error: SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘tablename .columnname’ doesn’t exist The culprit was a column with name test_id in one of the tables. As

CakePHP | Redirect from http to https URL

| By Webner

If you want to redirect from http to https in CakePHP, generally redirect method code is like this: $this­->redirect(array(“controller” => “myController”,”action” =>t; “myAction”)); But if your site is running on http protocol it will redirect to the url with http