Welcome to Geeklog, Anonymous Friday, November 29 2024 @ 06:34 am EST

Geeklog Forums

PHP code


Anonymous

Anonymous
Is there a way to make a staticpage execute php code? What I'm trying to do is a page that lists all users full names and email add. This pages would be available to registered members only. To be executed the page ext. has to be ".php", but a static page can't be named. Could I "include" a php page inside a static page. Would it work? Or is there any other way that I don't think of. Thanks
 Quote

Status: offline

Tony

Site Admin
Admin
Registered: 12/17/01
Posts: 405
Location:Urbandale, Iowa
First, this is a *very* bad idea from a security stand point. If you need a page to execute PHP then create a stand alone .php page. If you absolutely insist on this, I have no problem giving you your own noose so-to-speak. If you look in lib-common.php at the end of the function COM_siteHeader() there is a call to eval(). You need something similar for your code at the end of staticpages/index.php just before the output is printed. Be sure to check the eval() function on php.net.

---
The reason people blame things on previous generations is that there's only one other choice.


The reason people blame things on previous generations is that there's only one other choice.
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany

Also, the extended version 1.2 of the static pages plugin will allow you to use PHP in static pages. It's available from Tom Willet's site.

bye, Dirk

 Quote

All times are EST. The time is now 06:34 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content