Log In · Register

 
PHP code in a textarea, Having issues...
schizo
post Sep 23 2008, 05:04 PM
Post #1


Senior Member
******

Group: Staff Alumni
Posts: 2,435
Joined: Feb 2007
Member No: 506,205



I'm usually able to figure this kind of thing out on my owning, but my brain is fried and I give up.

I wrote a tutorial on using PHP includes, but I can't seem to get the actual PHP include codes to show up in the textareas.

Here's the page.

Is there anyway to disable the code from actually trying to work, if that makes sense?

help.gif <--Could resist using that cute little nugget.
 
 
Start new topic
Replies (1 - 2)
fixtatik
post Sep 23 2008, 05:14 PM
Post #2


Senior Member
******

Group: Member
Posts: 1,237
Joined: May 2008
Member No: 648,123



instead of using the actual php code (<?php include('yaddayadda.php'); ?>), put in the less-than greater-than signs on your own.

two ways to do it:
CODE
&lt;php include('yaddayadda.php'); ?&gt;

or:
CODE
<?php
$s = '<?php include('yaddayadda.php'); ?>';
echo htmlspecialchars($s);
?>

the second one will work better for longer codes. if you have something pretty lengthy, you can save it as an external text file, and set $s to be that file.
 
schizo
post Sep 23 2008, 05:19 PM
Post #3


Senior Member
******

Group: Staff Alumni
Posts: 2,435
Joined: Feb 2007
Member No: 506,205



Oh, wow. That was pretty simple. pinch.gif

Thank you so much. happy.gif

Closing and moving to resolved.
 

Closed TopicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members: