TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 195,852
  • Total Topics: 21,289
  • Online today: 357
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 195
  • Total: 195

Preview PHP block

Started by redone, June 08, 2005, 07:51:21 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

redone

Okay, here is the error:

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/britp2/public_html/forum/TPpreview.php(18) : eval()'d code on line 1

Parse error: parse error, unexpected $ in /home/britp2/public_html/forum/TPpreview.php(18) : eval()'d code on line 1

Done whilst previewing the following code:

echo $_SERVER['HTTP_USER_AGENT'];

echo '<p>Your IP address is:</p>';
echo $_SERVER['REMOTE_ADDR'];

But the code works! Any ideas?

Thanks!

Bjørn

I think its because SMF does some things to those variables, that the preview function doesn't. I made it separate, so it would not "break" the page.

..but I am thinking maybe just testing it in another window would be safe - and running it trough SMF that way would show it like its supposed to.have to test it, but it may be the way to go. As it is now, it isn't that much helpful.

redone

That's okay. I mean bottomline is the block works and displays just fine just no preview.


This website is proudly hosted on Crocweb Cloud Website Hosting.