![]() |
PHP Question ...
How else can i include a php file into my .shtml file?
TTT Script tells me to use this: [!--#include file="ttt-in.php" --] which has worled for me on other servers, but this new server has a problem with that format. I tried: [!--#include file="http://www.domain.com/ttt-in.php" --] but that didnt work Any other ways? |
uhm, did you replace [ ] with < > ??
|
The [ should be a <, but I assume you know that.
You need to have the relative server path to the file, not the url. Try this: [!--#include virtual="ttt-in.php" --] (replace the ] and [ with > and < ofcourse) |
no why would i do that?
lol j/k ofcourse i did btw nice sig, lol |
:glugglug
|
Quote:
ok ill go try it, thanks for trying to help. Ill keep you posted. |
You gotta have SSI enabled on your server in order for it to work. Ask your noc.
|
Btw, what error message do you get?
|
php and ssi dont go along..
Just convert the page to php..no need for ssi if php is enabled on the machine. |
Quote:
|
Quote:
Ok nope didnt work, its still showing all hits as bookmarks. Any other ideas? BTW Im assuming that goes between the [head] [/head] tags? |
you can, ofcourse, include a php files content with shtml but youll experience processing/execution difficulties by default.
|
hit me up on icq, 85992840
|
Quote:
ok i changed it to .php same issues. It is counting all hits as bookmarkers even though i know the hit came from a referrer. Any other ideas? |
so nobody knows any other ways to include a php file?
there must be more than one way, lol |
Ok this is what i have tried ...
with main page as a .shtml, [!--#include file="ttt-in.php" --> (within the head> tags) [!--#include file="ttt-in.php" --> (outside the head> tags) [!--#include file="http://www.totaltwat.com/ttt-in.php" --> (within the head> tags) [!--#include file="http://www.totaltwat.com/ttt-in.php" --> (outside the head> tags) [!--#include virtual="ttt-in.php" --> (within the head> tags) [!--#include virtual="ttt-in.php" --> (outside the head> tags) with main page as a .php, [?php include("ttt-in.php"); ?> (outside head> tags) [? require("wb_pgm.inc"); ?> (outside head> tags) [!--#include file="ttt-in.php" --> (within the head> tags) [!--#include file="ttt-in.php" --> (outside the head> tags) [!--#include file="http://www.totaltwat.com/ttt-in.php" --> (within the head> tags) [!--#include file="http://www.totaltwat.com/ttt-in.php" --> (outside the head> tags) |
Unless you're running Apache2, you cannot process a file through more than one module (SSI, or PHP). The solution then is this:
<?php require_once("/path/to/file.php"); ?> alternatively, you can configure to look at a list of paths to find files, called the include_path. If your file is in one of those directories, you can include it as just require_once("filename.php"); Recommend you trying running a page with just this command to see how your PHP is configured: <?php phpinfo(); ?> (had to change < to & lt ; in order for it to render in phpBB) |
Quote:
here is the result: http://totaltwat.com/test.php here is my page with the !--#include: http://totaltwat.com/index.shtml here is my page with .php extension: http://totaltwat.com/index.shtml nothing is working. All the hits still register as bookmarkers meaning the cookie is not working (the php include) |
Edit your post <i>now</i>. You do <b>not</b> want to give out the details of phpinfo() to a bunch of strangers.
The problem lies in the fact that you use revsharehosting, I am 99% certain of that. Try to find some people who have dealt with that problem before. (ie the problem of the trade script not recognizing referers) Also, the problem most likely isn't the cookie, since that is used for counting productivity, not hits. |
Quote:
omg, lol ok i deleted the file, rofl |
Quote:
yes that is the problem, im trying to find a way to get it working. Ive tried on rev's board, and on chicken board, figured id try here also. |
This is just a hunch, but try this...
<?php echo $_COOKIE["ttt_cookie"]; ?> This will show if your PHP scripts are seeing the TTT cookie. |
Instead of including the ttt-in.php, try including a php script containing the following:
PHP Code:
|
Quote:
Ok i did it and it echoed some numbers, i guess the name of the cookie? http://www.totaltwat.com/test.php |
Quote:
ok gimme a sec |
Quote:
ok you guys click this so i can see if its logging ref's http://totaltwat.com/test2.php |
|
|
Quote:
|
Quote:
why do they keep disapering? and what does that accomplish? |
Quote:
but i use this script on a few other sites and never had problem, and a zillion other people use it too .... only problem is on revshare |
btw, you can delete the test2.php and refs.txt from your server now.
|
Quote:
How many trades do you have in your script? |
Quote:
yes i know the problem is in revshare, lol ... i was hoping to find a way to call the php that will work with the bug within revshare. I have 4 trades in my script. |
|
That means the problem is with revsharehosting, and so far nobody has been able to figure out what it is yet.
|
Quote:
I have contacted server admin and he is "looking into it", just figured someone here might help me find a resolve. |
this is an exact copy of an email the admin wrote me ...
i was just looking through the board of turbotraffictrader.com and it seems there's a lot of issues regarding the hit counter... please refer to the http://www.chickenboard.com/read.php?f=13&i=1276&t=1276 this guy is talking about the full server path which i think this is the only issue... we are currently using PHP 4.2.3 which it is compatible with their script. alot of people are having problem with this hits and this is the key issue is the server path...please let me know what paths you have setup for the script? Now what exactly is a server path and how do i change it? |
Quote:
You can either use absolute paths, for instance: /var/www/html/in.php /blegh/blagh/www/httpdocs/cj/in.php or relative paths, for instance: in.php cj/in.php |
Now, the question is what paths are used in the script.
For instance, it could be that $_SERVER['DOCUMENT_ROOT'] is used as the path to the scripts, which on certain servers may give problems. |
Quote:
if (time() > $row[1]) { require_once("ttt-do_reset.inc.php"); dailylog(); } thats a line from the script, so it uses simple path's? |
Everything below this is illegal. Do it at your own risk. (It might work though).
In ttt-in.php, replace $referer = getenv("HTTP_REFERER"); $ip = getenv("REMOTE_ADDR"); with $referer = $_SERVER["HTTP_REFERER"]; $ip = $_SERVER['REMOTE_ADDR']; I repeat, this is illegal, and Choker may get pissed off because of it. If you tell him, that is. |
Quote:
well it would prolly work since obviously you know your stuff, but ive already had a run-in with choker about editing his script, never again, lol Thanks though |
or maybe if i edit it, he will get pissed at me and send me 5 million free hits?
lol j/k |
damnit, server admin still cant figure it out and lord knows im as useless as a set of tits on a bull, lol
|
| All times are GMT -7. The time now is 11:46 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123