Why rewrite URLs? Check Wikipedia
Make sure AllowOverride is on for your directory, or put in httpd.conf
# Apache (.htaccess or httpd.conf)
RewriteEngine On
<?php | |
class Form extends Validation { | |
private $action; | |
private $method; | |
private $name; | |
private $validation; | |
private $vMessage; | |
public $request = array(); | |
public $inputs = array(); |
<?php | |
class A implements ArrayAccess, Iterator, Countable | |
{ | |
public function __construct($arr) { | |
$this->arr = is_array($arr) ? $arr : func_get_args(); | |
} | |
public function __toString() { | |
return print_r($this->arr, true); | |
} |
<?php | |
namespace Treffynnon; | |
/** | |
* A PHP class to access a PHP array via dot notation | |
* (Agavi http://www.agavi.org was the inspiration). | |
* | |
* This was hacked in to an existing codebase hence the | |
* global config array variable. |
<?php | |
/** | |
* File: SimpleImage.php | |
* Author: Simon Jarvis | |
* Modified by: Miguel Fermín | |
* Based in: http://www.white-hat-web-design.co.uk/articles/php-image-resizing.php | |
* | |
* This program is free software; you can redistribute it and/or | |
* modify it under the terms of the GNU General Public License | |
* as published by the Free Software Foundation; either version 2 |
Why rewrite URLs? Check Wikipedia
Make sure AllowOverride is on for your directory, or put in httpd.conf
# Apache (.htaccess or httpd.conf)
RewriteEngine On
<?php | |
class o | |
{ | |
private $o; | |
// Get value | |
public function __get($k){return isset($this->o[$k])?$this->o[$k]:NULL;} | |
// Create or Get value |
<?php | |
// Domain Classes | |
abstract class Domain { // Provides means to persist models and understand relationships | |
public function __construct(Database_Interface $database, Domain_Builder_Base $builder) {/* ... */} | |
public function find($unique_key) {/* ... */} | |
public function find_all($unique_key) {/* ... */} | |
public function save(Domain_Model $model) {/* ... */} | |
public function find_all_related_to(Domain_Model $model) {/* ... */} | |
/* ... */ |
<?php | |
/* | |
* XSS filter, recursively handles HTML tags & UTF encoding | |
* Optionally handles base64 encoding | |
* | |
* ***DEPRECATION RECOMMENDED*** Not updated or maintained since 2011 | |
* A MAINTAINED & BETTER ALTERNATIVE => kses | |
* https://github.com/RichardVasquez/kses/ | |
* | |
* This was built from numerous sources |
<!DOCTYPE html> | |
<html lang="en-GB"> | |
<head> | |
<title>iTunes slider</title> | |
<link rel="stylesheet" href="style.css" type="text/css" /> | |
<script type="text/javascript" src="js/jquery.js"></script> | |
<script type="text/javascript" src="js/slider.js"></script> | |
</head> |
<?php | |
/* by pablo at compuar dot com see http://php.net/manual/de/function.base64-encode.php | |
* | |
* | |
*/ | |
$string = 'Blah'; | |
$encoded = strtr(base64_encode(addslashes(gzcompress(serialize($string),9))), '+/=', '-_,'); | |
$string= unserialize(gzuncompress(stripslashes(base64_decode(strtr($encoded, '-_,', '+/='))))); |