Help Need. Something Technical about Wordpress

snowmike

Newbie
Joined
Dec 24, 2007
Messages
32
Reaction score
3
Trying to install and use a referrers script with wordpress.
To make this script work...i need to include the php code below.
<? include_once('referrers/log.php'); ?>

But the instruction say i need to do a "full root path for the include"...

what is that mean...sorry i am noob at WP...

can someone help.please.
 
The full path would be something like this:

/home/virtual/yourblog.com/htdocs/wp-content/referrers/log.php
 
I always do one think when i don't know full root path. Make an error somewhere in the php code. Then try to load the page where the error is. You will see a message bla bla bla in /..../..../... on line XX this is your full root path. :)
 
Try this:

Code:
include_once($_SERVER['DOCUMENT_ROOT'].'/referrers/log.php');
 
or you can
Code:
<? include_once('http://www.YOURSITE.com/referrers/log.php'); ?>
 
It worked!
Thanks man!

One more question, the script asking me to do a "Cron Job Installation"
How do i do that/whats that mean...!?
or you can
Code:
<? include_once('http://www.YOURSITE.com/referrers/log.php'); ?>
 
It worked!
Thanks man!

One more question, the script asking me to do a "Cron Job Installation"
How do i do that/whats that mean...!?

I'm not a cron expert so if I butcher this someone chime in and correct me. Basically cron is a feature of most hosting companies and is a place where you go and enter a path to a script/file (maybe the file location you talked about above). You also enter the frequency (once a day, hour, minute...etc.) and save it. It basically instructs the server to (at your timeframe set) go to that file and execute the script in that file.
 
ok .... i know this .... ;)

i'm really bad at marketing, but should be able to answer your technical q ....

cron is basically a task scheduler in the linux or unix world
it's the same as windows' scheduled task found under
Start | Programs | Accessories | System Tools | Scheduled Task

what you need to take note is in your host cpanel, you should see a "cron job" option.
use the standard mode for easier usage
the only thing you need to take note is the path of the executable you specific.

in there, you must specify the full path
ie.
php /home/youruserid/public_html/pathtoyourphp/your.php

e.g
say your host user id is bobfrapples, then to run the log.php as a cron, you should specify, the "php" at the beginning of the line is required.

php /home/bobfrapples/public_html/referrers/log.php
 
Back
Top