Posts

Showing posts from January, 2013

[MYSQL][SOLVED] The used table type doesn't support FULLTEXT indexes

The problem occurred because of wrong table type. To solve the problem we need to change the type of the table. Mysql supports a few different types of tables, but the most commonly used are MyISAM and InnoDB. MyISAM is the only type of table that Mysql supports for Full-text indexes. To correct this error run following sql. ALTER TABLE <table name> ENGINE = MYISAM

[PHP] Get the Page Name.

The following code will get the name of the page in php. It is sometimes useful to get name of the page. $uri = $_SERVER['REQUEST_URI']; $pieces = explode("/", $uri); if ($pieces[3] == "upload.php") { echo "Page name is upload.php"; } My Uri was "/tubesite/admin/upload.php". So when I run explode method, it returned array with three strings. First string $pieces[0] was an empty string. Second string was tubesite. And so on. You can check out explode method. It uses to form substrings by splitting it on boundaries formed by the string delimiter http://php.net/manual/en/function.explode.php