php-windows Digest 9 Oct 2001 17:20:20 -0000 Issue 796
Topics (messages 9754 through 9768):
Re: php array
9754 by: Asendorf, John
9758 by: _lallous
Message
9755 by: Sichta Daniel
Re:Re: session timeout
9756 by: Michel Laine
available for freelancing
9757 by: Priya Chanu
Re: IIS 5.1 weird problem - please help
9759 by: Phil Driscoll
heredoc syntax: white space bug
9760 by: Richard Prangnell
Win2k/IIS/MSSQL Server problem
9761 by: Enzo Suma
9762 by: Enzo Suma
9763 by: Oronzo \(detto Enzo\) Suma
Stripping filepath from string
9764 by: Christian Sandfeld
9765 by: Christian Sandfeld
9766 by: Delbono Nicola
9767 by: _lallous
9768 by: Christian Sandfeld
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
OK. Here's some source. Figure it out for yourself from there. And do me
a favor, strip out the specific stuff and post it to phpbuilder, would ya?
Thank, John
--------------
/*******
external links list
*******/
//array for out of site links
//CASE SENSATIVE - upper case proceeds lower case
$arr_outer_links = array(
'Licking County Sheriff' => array(
'url' => 'http://www.lickingcountysheriff.com' ,
'desc' => 'A valuable law enforcement information site which
includes information ranging from Victim Advocate information to a listing
of Sexual Offenders in Licking County.'
),
'The Newark Alliance' => array(
'url' => 'http://www.newarkalliance.com' ,
'desc' => 'The Newark Alliance (formerly known as The Newark
Downtown Association) is dedicated to preserving the heritage of the past,
improving the quality of life in the present, and promoting and encouraging
the Downtown area as the Center of the Future.'
),
'Licking County Area Transportation Study' => array(
'url' => 'http://www.lcats.org' ,
'desc' => 'LCATS is the forum for cooperative transportation
decision-making by the principal elected officials of general purpose local
government in Licking County, Ohio. Members of LCATS include the City of
Newark, the City of Heath, and Licking County.
'
)
);
ksort ($arr_outer_links); //unnecessary
while ( list($key, $val) = each($arr_outer_links) ) {
echo "<li><A href=\"$val[url]\" target=\"new.Window\">$key</A> -
$val[desc]</li>\n<P> </P>\n";
}
---------------------
John Asendorf - [EMAIL PROTECTED]
Web Applications Developer
http://www.lcounty.com - NEW FEATURES ADDED DAILY!
Licking County, Ohio, USA
740-349-3631
Nullum magnum ingenium sine mixtura dementiae fuit
> -----Original Message-----
> From: SIR d [mailto:[EMAIL PROTECTED]]
> Sent: Monday, October 08, 2001 10:23 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] php array
>
>
> hi
> I'd like to build a multidimensional array that is loaded
> with Link_URLs and
> LinkNames. I wanna be able to output a list of links using
> the Link_Names
> and they should all be hyperlinks using Link_URLs as the reference.
>
> Can anyone help with some src..
> Thanx
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
>
--- End Message ---
--- Begin Message ---
$links = array(
'Altavista Search Engine' =>'http://www.altavista.com/',
'Google', =>'http://www.google.com/'
);
while (list($linkname, $url) = each($links))
{
echo "<a href='$url' target='_blank'>$linkname</a><br>";
}
hope it helps,
"Sir D" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> hi
> I'd like to build a multidimensional array that is loaded with Link_URLs
and
> LinkNames. I wanna be able to output a list of links using the Link_Names
> and they should all be hyperlinks using Link_URLs as the reference.
>
> Can anyone help with some src..
> Thanx
>
>
--- End Message ---
--- Begin Message ---
Hi,
cfg: w2k, Apache 1.3.20,php406
I have code which takes long time to produce result. Is there any way to
show message (new window or else) with text like "wait, I'm working!!".
Dan
--- End Message ---
--- Begin Message ---
Hmm.. Beats me, but take a look at these functions in the PHP help:
session.cache_expire
specifies time-to-live for cached session pages in minutes, this has no
effect for nocache limiter. Defaults to 180.
session.cookie_lifetime
specifies the lifetime of the cookie in seconds which is sent to the
browser. The value 0 means "until the browser is closed." Defaults to 0.
session.gc_maxlifetime
specifies the number of seconds after which data will be seen as
'garbage' and cleaned up.
Might help, i got no other clue - Sorry :-(
Examine how / which type of session you are using (cookie/url).
That way you can follow the manual and possibly see where the problem
may be.
Stanley Cheung wrote:
> yup, i found some parameter for SESSION,
> but it has any effect when i change the value...
> pls advise and help. thx!
>
> Stanley
>
> > Stanley wrote:
> >
> > > Hi all,
> > >
> > > can anyone tell me how can config "session timeout"
> > > i know the default time is 180min, how can i make it shortly?
> > >
> > > pls advise. thx a lot!
> > >
> > > Stanley
> >
> > Did you look in PHP.INI ?
> > I'm sure you'll find it in there.
> >
> > --
> >
> > Michel Laine
> >
> >
--
Michel Laine
Engineer / Network Administrator
SYSTEM TECHNOLOGY SWEDEN AB
Phone:(+46)-8-982255
Fax:(+46)-8-982060
Snail mail: Vretenvagen 2, 171 54 SOLNA, SWEDEN
E-mail: [EMAIL PROTECTED]
WWW: http://www.systemtech.se
--- End Message ---
--- Begin Message ---
Hello!!
Soory for those which are not relevant.
I am available for freelancing ...
Regards,
Priya
__________________________________________________
Do You Yahoo!?
NEW from Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1
--- End Message ---
--- Begin Message ---
On Monday 08 October 2001 9:39 pm, Markus Weber wrote:
> Hi,
>
> I think theres something wrong with your config. Iam working with
> ISAPI.DLL and PHP4.0.6 and it works very good & fast. I had one time the
> same that the logos from the phpinfo() site were not loaded. Check your
> configuration - specially NTFS- & webserver-Permissions for PHP directory
> (where isapi.dll & php.exe is located) and the webserver-folder where your
> php-scripts are hosted.
I'm not sure it is a config problem - when the ISAPI version of PHP goes
wrong this is exactly what happens. I think the problem is just the usual
thread safety related issues with the ISAPI module.
Cheers
--
Phil Driscoll
--- End Message ---
--- Begin Message ---
Hi y'all
Thought I would share a buglet with you.
In PHP 4, we now have the 'heredoc' syntax, a la Perl.
Unfortunately, there is a slight bug with it. If you follow the
statement-ending semi-colon with anything other than the 'return' character
(even white space), you'll get a parse error at the next evaluation of the
variable you assigned to the heredoc. Typically, the following won't work:
$query = <<< SQL
SELECT parentID
FROM messages
WHERE msgID = $_msgID
SQL; // can't put a comment (or anything else!) here
Just thought you should know - it doesn't seem to be documented...
--- End Message ---
--- Begin Message ---
I have configure PHP over IIS like CGI and then like ISAPI. I have find some
of the biggest problems with these configurations (shapes) never solved:
1. it was not able to manage sessions (if PHP is installed like ISAPI)
2. some personalized error pages (for example: white page "CGI Error The
specified CGI application misbehaved by not returning a complete set of HTTP
headers. The headers it did return are :"); are not implemented
3. data field mssql management
4. it's impossible to send two information of Header in the same page (for
example: cookie and location)
5. the manipulation data of mssql function did not return operation status
6. The result of query from db with col data type data restituing me a data
in extended format (ex. 22 Sept 2001),I have archiving YYYY/mm/dd
we have found a workaround for some of these problems whit the following
acts :
problem n. 4 are avoid whit use <META http-equiv="refresh" content="
0;URL=url"> instruction instead of Header ("Location:url");
problem n. 5 are avoid by creation of macro-function library;
I please you a solutions for a broblems not solve and a different solutions
for the solve one.
Excuse me for english write
--- End Message ---
--- Begin Message ---
I have configure PHP over IIS like CGI and then like ISAPI. I have find some
of the biggest problems with these configurations (shapes) never solved:
1. it was not able to manage sessions (if PHP is installed like ISAPI)
2. some personalized error pages (for example: white page "CGI Error The
specified CGI application misbehaved by not returning a complete set of HTTP
headers. The headers it did return are :"); are not implemented
3. data field mssql management
4. it's impossible to send two information of Header in the same page (for
example: cookie and location)
5. the manipulation data of mssql function did not return operation status
6. The result of query from db with col data type data restituing me a data
in extended format (ex. 22 Sept 2001),I have archiving YYYY/mm/dd
we have found a workaround for some of these problems whit the following
acts :
problem n. 4 are avoid whit use <META http-equiv="refresh" content="
0;URL=url"> instruction instead of Header ("Location:url");
problem n. 5 are avoid by creation of macro-function library;
I please you a solutions for a broblems not solve and a different solutions
for the solve one.
Excuse me for english write
--- End Message ---
--- Begin Message ---
I have configure PHP over IIS like CGI and then like ISAPI. I have find some
of the biggest problems with these configurations (shapes) never solved:
1. it was not able to manage sessions (if PHP is installed like ISAPI)
2. some personalized error pages (for example: white page "CGI Error The
specified CGI application misbehaved by not returning a complete set of HTTP
headers. The headers it did return are :"); are not implemented
3. data field mssql management
4. it's impossible to send two information of Header in the same page (for
example: cookie and location)
5. the manipulation data of mssql function did not return operation status
6. The result of query from db with col data type data restituing me a data
in extended format (ex. 22 Sept 2001),I have archiving YYYY/mm/dd
we have found a workaround for some of these problems whit the following
acts :
problem n. 4 are avoid whit use <META http-equiv="refresh" content="
0;URL=url"> instruction instead of Header ("Location:url");
problem n. 5 are avoid by creation of macro-function library;
I please you a solutions for a broblems not solve and a different solutions
for the solve one.
Excuse me for english write
--- End Message ---
--- Begin Message ---
Hi list,
I know I have seen this somewhere - but I can't find it (and for some reason
I can't get my head around it).
Is there a predefined function or alternatively an easy way to strip the
filepath of a string containing both filepath and filename?
Strings could look like this:
/my/file/path/myfile
/my/file/path/myfile.name
c:\my\file\path\myfile
c:\my\file\path\myfile.name
etc...
I know this should be fairly simple, but my mind is blank (if there's no
predefined function I know I should probably use some regex, but me and
regex don't get along (I always mess up)).
Any help will be greatly appreciated :-)
/Christian
--- End Message ---
--- Begin Message ---
Oh, I should probably have mentioned that what I want to end up with is the
stuff to the right of the last slash (be that forward of backslash).
/Christian
-----Original Message-----
From: Christian Sandfeld [mailto:[EMAIL PROTECTED]]
Sent: 9. oktober 2001 15:41
To: '[EMAIL PROTECTED]'
Subject: [PHP-WIN] Stripping filepath from string
Hi list,
I know I have seen this somewhere - but I can't find it (and for some reason
I can't get my head around it).
Is there a predefined function or alternatively an easy way to strip the
filepath of a string containing both filepath and filename?
Strings could look like this:
/my/file/path/myfile
/my/file/path/myfile.name
c:\my\file\path\myfile
c:\my\file\path\myfile.name
etc...
I know this should be fairly simple, but my mind is blank (if there's no
predefined function I know I should probably use some regex, but me and
regex don't get along (I always mess up)).
Any help will be greatly appreciated :-)
/Christian
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---
I created this function
http://www.key5.com/demo/getpath/getpath.php3
Take a look.
Be careful that sometimes you must use (-4) to get the -second level of
path.
----- Original Message -----
From: "Christian Sandfeld" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, October 09, 2001 3:41 PM
Subject: [PHP-WIN] Stripping filepath from string
> Hi list,
>
> I know I have seen this somewhere - but I can't find it (and for some
reason
> I can't get my head around it).
>
> Is there a predefined function or alternatively an easy way to strip the
> filepath of a string containing both filepath and filename?
>
> Strings could look like this:
> /my/file/path/myfile
> /my/file/path/myfile.name
> c:\my\file\path\myfile
> c:\my\file\path\myfile.name
> etc...
>
> I know this should be fairly simple, but my mind is blank (if there's no
> predefined function I know I should probably use some regex, but me and
> regex don't get along (I always mess up)).
>
> Any help will be greatly appreciated :-)
>
> /Christian
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
--- End Message ---
--- Begin Message ---
this regex/example should do:
<?
$str = "/my/file/path/myfile.asd";
$filename = 'no match!';
if (preg_match("/[^\\\\\/]+$/", $str, $matches))
$filename = $matches[0];
echo $filename;
?>
"Christian Sandfeld" <[EMAIL PROTECTED]> wrote in message
8710AE4FCD7ED511B1C800025558393005C92C@ZENSYS02">news:8710AE4FCD7ED511B1C800025558393005C92C@ZENSYS02...
> Hi list,
>
> I know I have seen this somewhere - but I can't find it (and for some
reason
> I can't get my head around it).
>
> Is there a predefined function or alternatively an easy way to strip the
> filepath of a string containing both filepath and filename?
>
> Strings could look like this:
> /my/file/path/myfile
> /my/file/path/myfile.name
> c:\my\file\path\myfile
> c:\my\file\path\myfile.name
> etc...
>
> I know this should be fairly simple, but my mind is blank (if there's no
> predefined function I know I should probably use some regex, but me and
> regex don't get along (I always mess up)).
>
> Any help will be greatly appreciated :-)
>
> /Christian
--- End Message ---
--- Begin Message ---
Thanks to all who provided input.
The basename function does the trick (as pointed out by Serge).
Once again thank you ;-)
/Christian
-----Original Message-----
From: Serge Nicolas [mailto:[EMAIL PROTECTED]]
Sent: 9. oktober 2001 18:37
To: Christian Sandfeld
Subject: Re: [PHP-WIN] Stripping filepath from string
http://www.php.net/manual/en/function.basename.php
Think this could help.
----- Original Message -----
From: "Christian Sandfeld" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, October 09, 2001 3:41 PM
Subject: [PHP-WIN] Stripping filepath from string
> Hi list,
>
> I know I have seen this somewhere - but I can't find it (and for some
reason
> I can't get my head around it).
>
> Is there a predefined function or alternatively an easy way to strip the
> filepath of a string containing both filepath and filename?
>
> Strings could look like this:
> /my/file/path/myfile
> /my/file/path/myfile.name
> c:\my\file\path\myfile
> c:\my\file\path\myfile.name
> etc...
>
> I know this should be fairly simple, but my mind is blank (if there's no
> predefined function I know I should probably use some regex, but me and
> regex don't get along (I always mess up)).
>
> Any help will be greatly appreciated :-)
>
> /Christian
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
--- End Message ---