Skip to content

Instantly share code, notes, and snippets.

View rmax's full-sized avatar
:octocat:
ヾ(⌐■_■)ノ♪

R Max Espinoza rmax

:octocat:
ヾ(⌐■_■)ノ♪
View GitHub Profile
#!/usr/bin/python2.4
#
# Copyright 2009, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
import functools
import logging
import traceback
import os
def log_calls(f):
"""
displays arguments and return val for debugging purposes
based on:
http://caines.ca/blog/programming/the-debuggerator-a-practical-intro-to-decorators-in-python/
<?php
var_dump($_REQUEST);
var_dump($_GET);
<?php
echo "=== \$_GET===\n";
var_dump($_GET);
echo "=== REQUEST_URI ===\n";
var_dump($_SERVER['REQUEST_URI']);
<pre>
<?php
echo "=== \$_GET===\n";
var_dump($_GET);
echo "=== REQUEST_URI ===\n";
var_dump($_SERVER['REQUEST_URI']);
?>
</pre>
<pre>
<?php
echo "=== \$_GET===\n";
var_dump($_GET);
echo "=== REQUEST_URI ===\n";
var_dump($_SERVER['REQUEST_URI']);
?>
</pre>
<pre>
<?php
echo "=== \$_GET===\n";
var_dump($_GET);
echo "=== REQUEST_URI ===\n";
var_dump($_SERVER['REQUEST_URI']);
?>
</pre>
RewriteEngine On
RewriteBase /test
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ test.php?path=$1 [L]
RewriteEngine On
RewriteBase /test
RewriteRule ^articles test.php?view=all [L]
RewriteRule ^articles/(\d+)-(.*)$ test.php?artid=$1&artn=$2 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ test.php?path=$1 [L]
RewriteEngine On
RewriteBase /test
RewriteRule ^articles/(\d+)-(.*)$ test.php?artid=$1&artn=$2 [L]
RewriteRule ^articles test.php?view=all [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ test.php?path=$1 [L]