CodeIgniter removing index.php from url

Try the following Open config.php and do following replaces to In some cases the default setting for uri_protocol does not work properly. Just replace by .htaccess Note: .htaccess code vary depending on hosting server. In some hosting server (e.g.: Godaddy) need to use an extra ? in the last line of above code. The following line will … Read more

Fatal Error: Allowed Memory Size of 134217728 Bytes Exhausted (CodeIgniter + XML-RPC)

Changing the memory_limit by ini_set(‘memory_limit’, ‘-1′); is not a proper solution. Please don’t do that. Your PHP code may have a memory leak somewhere and you are telling the server to just use all the memory that it wants. You wouldn’t have fixed the problem at all. If you monitor your server, you will see that it is now probably using … Read more

Only variable references should be returned by reference – Codeigniter

Edit filename: core/Common.php, line number: 257 Before After Update Added by NikiC In PHP assignment expressions always return the assigned value. So $_config[0] =& $config returns $config – but not the variable itself, but a copy of its value. And returning a reference to a temporary value wouldn’t be particularly useful (changing it wouldn’t do … Read more

What does __FILE__ mean?

The realpath() function gives you the file-system path, with any symbolic links and directory traversing (e.g. ../../) resolved. The dirname() function gives you just the directory, not the file within it. __FILE__ is a magic constant that gives you the filesystem path to the current .php file (the one that __FILE__ is in, not the one it’s included by if it’s an … Read more

PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP

Solution : Rename your function name emailcomm() to __construct() Explanation: In previous versions of PHP, if PHP cannot find a __construct() function for a given class, it will search for the old-style constructor function, by the name of the class, but now old style constructors are DEPRECATED in PHP 7.0, and will be removed in a future version. You should always use  __construct() in new code. Read php manual

What is a slug?

A slug is a part of the URL when you are accessing a resource. Say you have a URL, such as the one below, that displays all of the cars in your system: When you would want to reference a particular car in your system, you would provide the following URL: Notice how the URL … Read more