PHP Debug Function





ranking Sort Sort   |   date Sort Sort   |   member Sort Sort
Syndication

9
Date Submitted Mon. Apr. 3rd, 2006 10:41 AM
Revision 1
Helper jpinkham
Tags debug | Java | toString
Comments 1 comments
Do you find yourself implementing toString on your objects all the time, and wondering why (the debugger seems to do a pretty good job of it all by itself)...well, here's a bit of introspection applied to the problem. This is for all those quick debug sessions where you just want to do System.out.println(myComplexObject).

Instead, just do System.out.println(DebugPrint.toString(myComplexObject));
9
Date Submitted Mon. Feb. 20th, 2006 11:22 AM
Revision 2
Beginner elbartoli
Tags connect | display | mysql | PHP
Comments 1 comments
Connect to MySQL db & display result from Table query
9
Date Submitted Tue. Sep. 12th, 2006 1:29 AM
Revision 1
Beginner Headzoo
Tags http | PHP | Sockets
Comments 1 comments
Grab a remote web document using sockets, with limited handling for 301 & 302 redirects.
9
Date Submitted Sun. Nov. 19th, 2006 12:30 PM
Revision 1
Beginner pcolella
Tags PHP
Comments 2 comments
This is a rewrite of a basic ADODB / PHP Database pager. This pager has some very slick search, sort, and display configuration options. Modifications and improvements are very welcome. Thus I am sharing this code.

A basic example for using this pager would be as follows:

// Check class code for CSS styles used
require_once ('class.init.php');

// SQL Statement
$sql = 'SELECT table1.field1, table1.field2, table1.field3 FROM table1';

// Field Labels
$label_arr = array (
'field1' => 'Field 1 Heading',
'field2' => 'Field 2 Heading',
'field3' => 'Field 3 Heading'
);

// Hidden Fields
$vsel_arr = array (
'field3' => 0 // don't display field3 unless requested by the user
);

$sort_arr = array (
'field1' => 'asc' // sort by field1 ascending order (asc) or (desc)
);

// Config array
$config = array (
'db' => &$dbconn, // open ADODB connection
'sql' => $sql, // String of sql
'id' => 'table1_pager', // pager id for session variables
'label_arr' => $label_arr, // field heading array
'vsel_arr' => $vsel_arr, // fields to hide
'extra_param' => '', // extra paramaters to pass with edit, delete, add anchors
'form_width' => '100%', // table with
'form_title' => 'Table 1', // table title
'edit_anchor' => 'Edit', // link to edit
'del_anchor' => 'Del', // link to delete
'add_anchor' => 'Add', // link to add
'print_anchor' => 'Print', // link to print
'header_view' => true, // no function at this time
'search_view' => true, // no function at this time
'pk' => array ('field1' => true), // primary key field
'sort_arr' => $sort_arr, // sort field array
);

// create object then render it ...
$_pager = new pager($config); // create instance
echo $_pager->render(25); // render output
9
Date Submitted Thu. Feb. 22nd, 2007 5:20 PM
Revision 1
Beginner fleft
Tags File | Files | management | PHP | upload | uploader
Comments 4 comments
This is a Tiny PHP Uploading script. It SHOULD be safe from both really large files and non-image files.
9
Date Submitted Sat. Aug. 5th, 2006 7:56 AM
Revision 1
Beginner delook
Tags HTML
Comments 1 comments
Put a break in a tooltip (limited chars)
9
Date Submitted Mon. Oct. 10th, 2005 10:25 AM
Revision 1
Coder mattrmiller
Tags File | PHP | Size
Comments 3 comments
Get File Size
9
Date Submitted Thu. Apr. 13th, 2006 10:46 AM
Revision 1
Coder mattrmiller
Tags Array | Case | PHP
Comments 0 comments
Change the case of an array.
10
Date Submitted Sun. May. 20th, 2007 5:27 AM
Revision 1
Scripter SecondV
Tags Online | PHP | URL
Comments 1 comments
This simple function will check if a url is valid (going by parse_url()) and if it's 'online' - by seeing if it returns a 302, 301, or 200 status code.
10
Date Submitted Tue. Feb. 28th, 2006 5:52 AM
Revision 1
Scripter TimYates
Tags HTML | JavaScript
Comments 0 comments
A prototype function to get an array of elements by id in an array