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.
Showing posts with label PHP. Show all posts
Showing posts with label PHP. Show all posts
Monday, August 15, 2011
openSIS Community Edition
Saturday, September 18, 2010
Sunday, August 8, 2010
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
$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
Thursday, August 27, 2009
Sunday, August 23, 2009
Sunday, July 5, 2009
Transaction in Zend Framework
http://framework.zend.com/manual/en/zend.db.html#zend.db.adapter.transactions
The MyISAM engine doesn't support transaction.
You may need to use InnoDB instead.
Read the following post for my question:
http://stackoverflow.com/questions/1083857/cannot-rollback-transaction-in-zend-framework
The MyISAM engine doesn't support transaction.
You may need to use InnoDB instead.
Read the following post for my question:
http://stackoverflow.com/questions/1083857/cannot-rollback-transaction-in-zend-framework
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.
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.
Subscribe to:
Posts (Atom)