Gahh!

Python Server Pages!!!!

Gahh!

Don't ever suggest that again!

On 1/25/2010 10:50 AM, mdipierro wrote:
Not that this is a good idea in general BUT you can do the
following....

create a web2py app called, for example, "php" with a single
controller called default.py that contains

def index(): redirect(URL(r=request,f='public/index'))
def public():
      response.view='default/public/%s.html' % request.args(0)
      return dict()
@auth.requires_login()
def private():
      response.view='default/private/%s.html' % request.args(0)
      return dict()
def user(): return dict(form=auth())

then in views/default make two subfolder:"public" and "private".

Now you can program in web2py like you would in PHP. For example you
can create

views/default/public/index.html

with inside:

<html><body><h1>Hello</h1>{{for k in range(3):}}World<br/>{{pass}}</
body></html>

In the .html files you can {{db.define_table(....)}} and
{{form=crud.create(...)}} and {{redirect(....)}}

files in public will not require login, stuff in private will require
login.

There is a limited and experimental and lousy PHP to web2py converter
(http://web2py.com/php) perhaps it could be integrated to support
proper PHP syntax with web2py functions.

Massimo


On Jan 25, 9:48 am, Pynthon Pynthon<forumx...@gmail.com>  wrote:
Hello

Maybe it sounds strange but I need something like Web2py for PHP. Most PHP
frameworks are too complicated. I know Codeigniter but IMO web2py has a
great job, too for newbies that donĀ“t know any OOP.

Do you think something with the simplicity of web2py exists in PHP?

Thanks and sorry for the strange question.
F-X

--
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.

Reply via email to