hackalive
Members-
Posts
652 -
Joined
-
Last visited
Everything posted by hackalive
-
How can I check if "<php>" exists within a string? I have tried this but is always returns false even when it should be true (something to do with UTF8 i think) $PhpTagCheck = '<PHP>'; $PhpTagCheck = strpos($contents, $PhpTagCheck); if($PhpTagCheck == true){} else {}
-
FYI: I have tried exec() with no luck
-
or sometimes it might just be "echo $_SERVER['HTTP_HOST'];"
-
Hi guys, I have a PHP variable $var which is "$header = 'http://'.$_SERVER['HTTP_HOST'].'/'; header("location: $header");" now some how in my php file I need to execute this variable as PHP any ideas, all help is much appreciated
-
SOLVED and incase anyone everneeds it in the future where I had require_one do this instead http://www.acuras.co.uk/articles/88-php-include-a-file-and-store-contents-to-variable-using-output-buffer Thanks to everyone who offered adive and help
-
include yields the same result as require
-
TeddyKiller I appreciated what you are saying but is there a way to get a file other than using require_once, the file structure must remain as is, just need a new way for require_once
-
someone must have an idea?
-
I have done a bit more fiddiling and it is definetly becuase of the require_once so I need a new way of doing this
-
having function.php as return "AAA"; instead of with require_once places the contents in the right spot, so I need to do something other than require_once in order to dsiplay the whole page
-
I have no idea how to do this, but I am thinking what if I convert the echothis.php to HTML so not (or maybe I have no idea) have require_once('echothis.php) and have phphtml('echothis.php') and even if this is not a viable solution for this problem I would like to know if such a PHP function exists thanks The require_one is making the content display early so I need another way of calling, that is the problem, or at least part of
-
for some stupid reason it is echoing before it compiles it all together with the other code
-
in essence I want to call a PHP file which is like an "app" with tables etc (whatever I write) into my CMS on the relevant page, so if there are any better ways people can suggest
-
monkeytooth thanks for your help but unfortuanately I cannot use your code, so if anyone else has any ideas
-
so what is the "correct" way to do this
-
Hi guys, I have an index.php page which run some code and executes a few functions which should echo it in a certain location, instead it continues to echo in the top left of the index.php echothis.php (file that should be echoed to certain location) <?php echo $_SESSION['login_to']; ?> <h4>WLWW</h4> function2.php (file calling the function whcih call for insert purposes echothis.php <?php function insertt(){$require_once = $_SERVER['DOCUMENT_ROOT'].'/echothis.php'; require_once($require_once); } ?> function1.php (calls function2.php where needed) <?php function go(){ insertt();?> index.php <H4>WELCOME</H4><?php go(); ?> I have left out the top require require_onces for the files but as you can see index.php require_onces function1.php, function1.php calss function2.php and function2.php echothis.php any help is much appreciated
-
thorpe can you give me code suggestion
-
the main point is why does this error occur and why for the line previously indicated?
-
okay, in a tbl field I have (as an example) AAA: <AL1><AL2><b><AL3> furthermore in another table field I have BBB: <AL1>How is it going?<AL2>Well<AL3>Thats great I have code which works that replaces <AL1> etc from "AAA" with the relevant content from "BBB" finally what happens is this $qry_AL = "SELECT max(position) FROM `articles` WHERE `uri`='$uri'"; $result_AL= $mysqli->query($qry_AL, MYSQLI_STORE_RESULT); $AL = mysqli_fetch_array($result_AL); $AL = $AL['0']; for($i=0;$i<=$AL;$i++) { ${'AL'.$i} = implode("", ${'AL'.$i}); } return $PL1 this code finds the max(position) in a table (eg 5), what happens is it implodes $AL1 array into $AL1 or $AL2 array into $AL2 etc but it is resulting in the already mentioned error
-
your code cannot be used as sometimes it may get to $AL1000 it has to be completely self running (as such)
-
$AL1[0] = "hi"; $AL[1] = "and"; as an example (is predefined) pulled from another table
-
the code get the max position (eg 1) from a table then as a loop (for) it implodes all $AL1 arraqy data into a sting variable $AL1 then does a return
-
can you elaborate on exactly why
-
thorpe could you provide an example using my code above please
-
what are you using to encrypt?