Commit 17a0fe1b authored by Taddes Kroes's avatar Taddes Kroes

Added config and test file/

parent 06bcb1db
<?php
/**
* Base and extention config for pQuery utility framework.
*
* @package pQuery
*/
/**
* Indicates whether the framework is in debug mode, which right
* now only means that occuring errors will be displayed or not.
*
* @var bool
*/
define('DEBUG', true);
/**
* The root location of the pQuery framework folder, used for file inclusions.
*
* @var string
*/
define('PQUERY_ROOT', 'D:/xampp/htdocs/pquery/');
/**
* Indicates whether errors occuring in the framework will
* terminate the script.
*
* @var bool
*/
define('ERROR_IS_FATAL', true);
/**
* Abstract class containing extention configs.
*/
abstract class Config {
/**
* Config for MySQL extention.
*
* @var array
*/
static $sql = array(
'host' => 'localhost',
'username' => 'root',
'password' => '',
'dbname' => 'tcms2'
);
}
?>
\ No newline at end of file
<?php
include_once '../debug.php';
include_once 'base.php';
pQuery::require_plugins('array', 'sql');
// Array test
/*$a = _p(range(0, 10));
while( !$a->is_empty() ) {
debug($a->pop(), $a->reverse()->pop());
}*/
echo '<br><br>';
// SQL test
$sql = _sql("select * from posts where slug = '[slug]'")
->set(array('slug' => 'contact'));
$results = $sql->fetch_all('object');
$results = _arr($results);
debug($results);
?>
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment