PHP code in a textarea, Having issues... |
![]() ![]() |
PHP code in a textarea, Having issues... |
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? |
|
|
|
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 <php include('yaddayadda.php'); ?> 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. |
|
|
|
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.
Thank you so much. Closing and moving to resolved. |
|
|
|
![]() ![]() |