Marek's dungeon of things

CodeIgniter file errors

Details
Written by: Marek
Category: Programming
Published: 05 October 2018
Hits: 1072

I kept receiving an errors related to filenames with capital letters for example system\core\Benchmark.php or system\core\CodeIgniter.php that they were missing. To solve it I had to extract the zip file from CI site in Windows and then copy it over. Doing this kept the exact file names without changing their names to lower case. Originally I extracted the zip file in ubuntu which automatically renamed Benchmark.php to benchmark.php which caused CI to have some major issues.

CodeIgniter QRG

Details
Written by: Marek
Category: Programming
Published: 05 October 2018
Hits: 1106

 

 

Accessing Controllers, Methods and Parameters
index.php/Controller/Method/Parameter1/Parameter2/...

In Controller
$data['variable'];

Then use in view as
<?php echo $id ?>

Linksys Cisco annoying redirect on WRT54G2

Details
Written by: Marek
Category: Programming
Published: 11 May 2010
Hits: 2497
If you have a WRT54G2 Cisco/Linksys router even with the Cisco Web Assitant disabled you may want to use this link to access your router, otherwise it will just keep redirecting to a website:
http://<yoursite>/basic.htm

Count files in directory

Details
Written by: Marek
Category: Programming
Published: 01 November 2009
Hits: 2580
find . -type f |wc -l

PHP: Cookies

Details
Written by: Marek
Category: Programming
Published: 25 June 2005
Hits: 2708
Create cookie this way:
<?php
setcookie ("CookieName","Value");
//redirect to a main screen
header("Location: main.php");
?>

In the file main.php, test for the value:
<?php
if ($_COOKIE['CookieName'])
{
echo $_COOKIE['CookieName'];
}
else
{
echo "cookie could not be set";
}
?>
  1. PHP: Passing objects in sessions

Page 1 of 2

  • 1
  • 2