Skip to content

Instantly share code, notes, and snippets.

@se4c0met
se4c0met / ls.php
Created Nov 23, 2012
Browse AppFog file system (PHP instance)
View ls.php
<?php
/*
due to the open_basedir restriction, $tgtPath must be something like the following path param:
http://<your domain>.aws.af.cm/ls.php?path=/var/vcap.local/dea/apps/f-0-21341234123412abcdefgc75cc0f96b9/app/
to discover what are the allowed paths, try supplying any path, e.g. '/' then view the error logs via:
af logs <your app name>
*/
@se4c0met
se4c0met / wsgi.py
Created Nov 23, 2012
Browse AppFog file system (Python WSGI instance)
View wsgi.py
import os
from bottle import Bottle,route,static_file,run
from StringIO import StringIO
application = app = Bottle()
@app.route('/')
def hello():
return "<pre>Usage: Browse http://<your domain>.aws.af.cm/ls//"
@app.route('/ls/<filename:path>')