Showing posts with label PHP. Show all posts
Showing posts with label PHP. Show all posts

Monday, August 15, 2011

openSIS Community Edition

OpenSIS is an opensource web-based student information system that allows schools to take attendance, store grades, create report cards, and many other things for students, teachers and parents.

Saturday, November 28, 2009

Remove null element in PHP array and reorder

<?php

$my_array = array(5, "abc", null, 2.5, NULL, 0, "", false, 8);
print_r($my_array);


function is_notnull($v) {
return !is_null($v);
}

$remove_null_array = array_filter($my_array, "is_notnull");// remove null element
echo "<p>remove_null_array:<br />";
print_r($remove_null_array);

$reordered_array = array_values($remove_null_array);
echo "<p>reordered_array:<br />";
print_r($reordered_array); // reorder the array values

Sunday, July 5, 2009

Thursday, May 28, 2009

setting of htaccess

1. php_flag register_globals off
instead of just by $abcif this flag sets to off, program will be only able to get the $_GET["abc"], $_POST["abc"],etc if the url is url.html?abc=123

2. php_flag magic_quotes_gpc off
This flag is used to originally give backslash to gpc(get, post, cookie) to prevent SQL injection.

3. php_flag short_open_tag on
Allow the use of short open tag < ? instead of < ?php

4. Options -Indexes
Disallow directory browsing

5. DirectoryIndex index.php index.htm index.html
If the user types the directory name, we search through the list of index.php to show it.