Results 1 to 7 of 7
-
21st Mar 2012, 12:53 PM #1OPMember
need help with php code
need a bit help with php.
i have a script that gets info from file and displays it on site, however when file contains php script, then site will run it, and thats bad bcos security
php code to get file:
<?php include("./files/".$_GET["ID"].".file"); ?>
is there any way to disable php from running and displaying only file content, so it would ignore php tags in content. however it should allow html tags
cheersitmees Reviewed by itmees on . need help with php code need a bit help with php. i have a script that gets info from file and displays it on site, however when file contains php script, then site will run it, and thats bad bcos security php code to get file: <?php include("./files/".$_GET.".file"); ?> is there any way to disable php from running and displaying only file content, so it would ignore php tags in content. however it should allow html tags cheers :) Rating: 5
-
21st Mar 2012, 01:00 PM #2MemberWebsite's:
imdber.org justpaste.mefile_get_contents? cURL?
The particular use of include() is to include php files so would be able to run them as part of your code.
-
21st Mar 2012, 01:13 PM #3OPMember
darn i should have taken that php course
edit: gonna contact script creator, he probably has ideas
-
21st Mar 2012, 09:52 PM #4MemberWebsite's:
imdber.org justpaste.me^HTML can't be "parsed" in inputs.
-
21st Mar 2012, 10:18 PM #5Member
This site is using a hacked database of W junction
Last edited by Gavo; 4th Jan 2015 at 02:23 PM.
-
21st Mar 2012, 10:21 PM #6BannedWebsite's:
vaporhostn.com
-
22nd Mar 2012, 10:01 AM #7Respected Developer
if you wants to display html from a file and not execte php code from that file then you can use fopen, here is a small example.
PHP Code:$file = "location/file.php";
$f = fopen($file, "r");
while ( $line = fgets($f, 1000) ) {
print $line;
}
Bots Development | Web Development | Wordpress Customization | PSD Conversion
Life has many twists and turns in it, you have to take what you are given and use it for the best.
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Help With Letitbit Js To BB Code aka Embedding streaming code in forums
By JoomlaZ in forum Web Development AreaReplies: 1Last Post: 3rd Apr 2012, 09:50 AM -
PHP Code Help
By .nItIsH. in forum Technical Help Desk SupportReplies: 2Last Post: 25th Jan 2012, 03:29 PM -
Need a good coder to code a skin, I will show you what I need, you just code it
By Nickk96 in forum Web Development AreaReplies: 1Last Post: 27th Aug 2011, 01:45 PM -
{LF} a code
By DeathNote in forum Web Application/Script SupportReplies: 2Last Post: 23rd Oct 2010, 04:18 AM -
[vBulletin BB Code] Moderated Message: (Like W-BB's Staff BB Code!)
By Ghost Dog 13 in forum Webmaster ResourcesReplies: 13Last Post: 26th Sep 2009, 06:19 PM
themaRegister - register to forums...
Version 3.54 released. Open older version (or...