Welcome to Geeklog, Anonymous Saturday, April 19 2025 @ 04:37 am EDT
Geeklog Forums
How can I break PHP staticpages?
Status: offline
LWC
Forum User
Full Member
Registered: 02/19/04
Posts: 818
How can I make PHP staticpages only work in certain situations?
If I try:
exit();
then it also blanks out the entire page (if it's a centerblock).
If I try:
break;
or
continue;
tnen the staticpage causes this error:
Finally,
return "";
does work, but is this the correct way? It's not a function after all, but direct code.
If I try:
Text Formatted Code
if (...)exit();
then it also blanks out the entire page (if it's a centerblock).
If I try:
Text Formatted Code
if (...)break;
or
Text Formatted Code
if (...)continue;
tnen the staticpage causes this error:
Fatal error: Cannot break/continue 1 level: eval()'d code
Finally,
Text Formatted Code
if (...)return "";
does work, but is this the correct way? It's not a function after all, but direct code.
12
11
Quote
Status: offline
jmucchiello
Forum User
Full Member
Registered: 08/29/05
Posts: 985
If the static page is of the return a string type, you just return an empty string.
If it's an output captured page, return should work. You get the result of the eval'd code by checking the return from eval:
$result = eval("return 4;"
;
If you don't have anything to return, use return;
If it's an output captured page, return should work. You get the result of the eval'd code by checking the return from eval:
$result = eval("return 4;"

If you don't have anything to return, use return;
11
16
Quote
All times are EDT. The time is now 04:37 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