Hi all,
I am working on a small php script which should do the
following. I want all the links in the page to be
preceded by first character and first two characters
of the link.Please look into the example below for
more
clarification.
eg.
a href=/code.htmllink here/a to be
replaced as
a
From: [EMAIL PROTECTED]
Hi all,
I am working on a small php script which should do the
following. I want all the links in the page to be
preceded by first character and first two characters
of the link.Please look into the example below for
more
clarification.
eg.
a href=/code.htmllink
Hi
I have never used .htaccess but I'll read up on it, I am the ISP so it
won't be a problem :)
Tom
At 06:12 PM 6/04/2002, Chris Adams wrote:
In article [EMAIL PROTECTED], Tom
Rogers wrote:
Thats what I was after :)
Glad I could help.
At the top of each page I now do
$reltoroot =
How about:
$site_root = '/www/user/htdocs/';
img src=?php echo $site_root; ?images/logo.png /
Instead of going relative, go from the root. Or you could put $site_root
as your url:
$site_root = 'http://www.your_site.com/';
--
Julio Nobrega.
Um dia eu chego lá:
Hi
Yes that would be fine for the html examples I gave but the real use is for
php to find the include directory which I keep out of the server tree, one
directory back like this
include($relative_root.../include/mysql_connect.inc)
Each domain has its own include directory which I want to
: Friday, April 05, 2002 2:33 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Re: help condensing regular expressions
Hi
Yes that would be fine for the html examples I gave but the real use is for
php to find the include directory which I keep out of the server tree, one
directory back like
PROTECTED]
Subject: Re: [PHP] Re: help condensing regular expressions
Hi
Yes that would be fine for the html examples I gave but the real use is for
php to find the include directory which I keep out of the server tree, one
directory back like this
include($relative_root.../include/mysql_connect.inc
In article [EMAIL PROTECTED], Tom
Rogers wrote:
I am trying to calculate how far into a directory structure I am so that I
can include images and include files without having to hard code them.
I need to turn $PHP_SELF which could be /admin/emails/index.php into ../../
which I can then use
Thanks Chris
Thats what I was after :)
At the top of each page I now do
$reltoroot = preg_replace(|/[^/]+|, ../, dirname($_SERVER['PHP_SELF']));
ini_set (include_path,ini_get(include_path).:.$reltoroot.../include);
which takes care of the include path
I use the path translated info for pages
In article [EMAIL PROTECTED], Tom
Rogers wrote:
Thats what I was after :)
Glad I could help.
At the top of each page I now do
$reltoroot = preg_replace(|/[^/]+|, ../, dirname($_SERVER['PHP_SELF']));
ini_set (include_path,ini_get(include_path).:.$reltoroot.../include);
which takes care
Hi Daniel,
José daniel ramos wey ...
Hi! I´m new to regular expressions, and it seems to be an art to make it
work as expected.
I´m trying to remove all single-line comments from an string - that´s
everything after // to the end of a line. I expected that this would do
the job:
if (($hostname) || ($HOSTNAME)) {
$hostname= trim($hostname);
if ($HOSTNAME)
$hostname = trim($HOSTNAME);
if (!eregi(^[-a-z0-9-]+(\.[a-z0-9-]+)*$ , $hostname)) {
print_error(your byour hostname/b is invalid);
}
$HOSTNAME = $hostname;
}
Things I know are wrong:
12 matches
Mail list logo