vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Some sort of php tag, that allows FULL html? (https://vborg.vbsupport.ru/showthread.php?t=47485)

DrkFusion 01-07-2003 10:28 PM

Some sort of php tag, that allows FULL html?
 
As you know in php, you can't use double quotes without putting for ex:
Code:

<input type=\"text\" name=\"head\">
Is there some sort of php tag, or function that you can use to parse html normally?

With the double quotes and all?
like
fullhtml("html here");
*note i made up that above :p

DrkFusion 01-07-2003 10:30 PM

Also
what is
htmlentities()
?

NTLDR 01-07-2003 10:42 PM

Quote:

Originally posted by DrkFusion
Also
what is
htmlentities()
?

It converts things like " to &quot; and & to &amp; in strings, although its seems you should use htmlspecialchars(); if your not using ISO8859-1 acording to PHP.net

Xenon 01-08-2003 04:11 PM

Arunan, if you use ' ' around the String then you can use " in it :)

filburt1 01-08-2003 04:45 PM

Quote:

Originally posted by Xenon
Arunan, if you use ' ' around the String then you can use " in it :)
but (IIRC) you then won't get variables parsed; i.e., if $test is 1, then echo 'test is $test' will not echo test is 1.

DrkFusion 01-08-2003 06:24 PM

Well I want to use normal html, no editing, with the double quotes and all, basically its like me writing normal html in a html page, but I want to incorporate it in php, what function would allow me to put html into it without having to format the html to fit php's needs.

poi@nwdnb 01-08-2003 06:35 PM

You are probably aware of this, but just drop out of PHP code completely..

PHP Code:

<?php
some
.php.code.here();
?>

<html>
here is the html code
the value of $variable is <?=$variable?>
</html>

<?
more.php.code.here();
?>

And use the php echo() shortcut syntax to return the values of variables ie. <?=$somevariable?> (just enclose the variable inside of <?= ... ?>

Note to use this echo() shortcut you must have the short_open_tag configuration directive enabled.

I do not know of any specific function that would allow raw html code to be echo'd back to the browser. This is just the way this type of embedded code forces us to work i think!

Velocd 01-09-2003 01:32 AM

Untested, but try using:
PHP Code:

$example addslashes("<input type="text" name="head">"); 

Or maybe some variation of this will work.

Also untested, but there are two PHP directives in your php.ini file known as magic_quotes_gpc and magic_quotes_runtime, that basically will automatically add and strip slashes for you.

DrkFusion 01-09-2003 11:05 AM

Parse error: parse error, unexpected T_STRING in /home/virtual/site19/fst/var/www/html/vbnews.php on line 2

Thats the error I get, Velocd :(

DrkFusion 01-09-2003 11:05 AM

PHP Code:

$example addslashes('<font face="verdana" color="#000000" size="2">Hi</font>');
echo 
"$example

Works...YAY :) Thanks Guys!


All times are GMT. The time now is 11:37 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02687 seconds
  • Memory Usage 1,737KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (3)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete