Nicolas Grekas - nicolas.grekas, gmail.com
17 June 2011 - Last updated on 3 sept. 2011
Not updated any more on this gist. See:
<?php | |
/** | |
* Smarty {json} plugin | |
* | |
* Type: function | |
* Name: json | |
* Purpose: fetch json file and assign result as a template variable (array) | |
* @author Tony Landis | |
* @copyright 2007 Tony Landis | |
* @website http://www.tonylandis.com |
<?php | |
/** | |
* Smarty {soap} plugin | |
* | |
* Type: function<br> | |
* Name: soap<br> | |
* Purpose: post http data and display results from soap webservice | |
* Params: url, post(true/false - passes along orig params), assign, | |
* Usage: {soap assign=soapResponse | |
* endpoint=http://www.site.com/search.soap |
<?php | |
$data = array( | |
array('company'=>'AIG', 'id'=>1, 'balance'=> '-$99,999,999,999.00'), | |
array('company'=>'Wachovia', 'id'=>2, 'balance'=> '-$10,000,000.00'), | |
array('company'=>'HP', 'id'=>3, 'balance'=> '$555,000.000.00'), | |
array('company'=>'IBM', 'id'=>4, 'balance'=> '$12,000.00') | |
); | |
$renderer = new ArrayToTextTable($data); |
exports.createHandler = function (method) { | |
return new Handler(method); | |
} | |
Handler = function(method) { | |
this.process = function(req, res) { | |
params = null; | |
return method.apply(this, [req, res, params]); | |
} | |
} |
<?php | |
/** | |
* Convert a comma separated file into an associated array. | |
* The first row should contain the array keys. | |
* | |
* Example: | |
* | |
* @param string $filename Path to the CSV file | |
* @param string $delimiter The separator used in the file | |
* @return array |
<?php | |
/** | |
* This is free and unencumbered software released into the public domain. | |
* | |
* Anyone is free to copy, modify, publish, use, compile, sell, or | |
* distribute this software, either in source code form or as a compiled | |
* binary, for any purpose, commercial or non-commercial, and by any | |
* means. | |
* |
<html> | |
<head> | |
<style type="text/css"> | |
body { | |
font: 14px Verdana, Geneva, sans-serif; | |
height: 500px; | |
width: 700px; | |
margin: 10px 20px; | |
} |
Nicolas Grekas - nicolas.grekas, gmail.com
17 June 2011 - Last updated on 3 sept. 2011
Not updated any more on this gist. See:
about | |
account | |
add | |
admin | |
api | |
app | |
apps | |
archive | |
archives | |
auth |
<? | |
require_once "php_cache.php"; | |
echo 123456; | |
phpinfo(); |