GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   how can i display PHP code in a text field witout it bein executed? (https://gfy.com/showthread.php?t=917241)

p3rsian 07-21-2009 11:35 PM

how can i display PHP code in a text field witout it bein executed?
 
i want to show a code in a page of my site that can be copy n paste but its runnin the code even when i put in text field

and is there way to make 1 php code within it be executed while the rest is not? i want it to echo a variable within the php code

thank u

p3rsian 07-22-2009 12:15 AM

n e 1
p l z

WarChild 07-22-2009 12:16 AM

Sorry that's haram.

cLin 07-22-2009 12:25 AM

http://tinyurl.com/l5hvzt

quantum-x 07-22-2009 12:42 AM

ever tried using <? your code ?>

who 07-22-2009 12:43 AM

Put it inside a textarea, and encode it first.

rowan 07-22-2009 12:50 AM

echo "<" . "?php\n";
?>
<your code here... don't include the leading and trailing ?php tags>
<?php
echo "?" . ">\n"

Be aware that if your displayed code has any HTML in it the browser will probably eat it up.

scouser 07-22-2009 12:54 AM

use
highlight_string("<? echo $test; ?>");

scouser 07-22-2009 12:54 AM

http://us2.php.net/manual/en/functio...ght-string.php

(assuming you want to do what i think you want to do)


All times are GMT -7. The time now is 05:09 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123