[EMAIL PROTECTED] (Scott Miller) wrote in
news:[EMAIL PROTECTED]:
I have a text file (log file) that I want to be able to read the last
30 or 40 lines of. I've created the code below, but since this file
is so large (currently 8 MB) it won't work. The code works on smaller
files, but not
I apologize if this message is a repeat; I've had trouble posting with
Thunderbird.
I'm interested in how you folks would approach the following issue:
You have a list of data, in a user-defined sequence. For instance, a list
of song titles that can be rearranged on a web page in any order. I
No, it's running on a FreeBSD server. I don't suppose it could have to do
with the firewall or browser security settings on my machine, though ...
could it? I can verify that the session file is being written to the
server's tmp directory... I'm stumped.
--
Matt Grimm
Web Developer
The Health
refresh
the page, it loads correctly. What is going on?
Thank you,
--
Matt Grimm
Web Developer
The Health TV Channel, Inc.
(a non - profit organization)
3820 Lake Otis Parkway
Anchorage, AK 99508
907.770.6200 ext. 686
907.336.6205 (fax)
E-mail: [EMAIL PROTECTED]
Web
, but that's it --
it's a blank white page otherwise.
The apache error log is silent, and the access log is normal. No php errors
are displayed or written to the log. Here's the real kicker -- if I refresh
the page, it loads correctly. What is going on?
Thank you,
--
Matt Grimm
Web Developer
The Health
://www.sitepoint.com/article/728
--
Matt Grimm
Web Developer
The Health TV Channel, Inc.
(a non - profit organization)
3820 Lake Otis Parkway
Anchorage, AK 99508
907.770.6200 ext. 686
907.336.6205 (fax)
E-mail: [EMAIL PROTECTED]
Web: www.healthtvchannel.org
Matt Hedges [EMAIL PROTECTED] wrote in message
news
?
I'm just talking about the basics, like empty required fields, illegal
characters, string lengths, etc.
What are your preferred methods? I do an awful lot of content management
with HTML forms, so it's not an entirely spurious question.
--
Matt Grimm
Web Developer
The Health TV Channel, Inc
relied upon for more serious validation.
--
Matt Grimm
Matt Grimm [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Is there a distinct advantage to doing form validation / error checking on
the server side using PHP? That's how I've always done it because I know
PHP better than
$_SERVER['SCRIPT_NAME']
or
$_SERVER['PHP_SELF']
--
Matt Grimm
Web Developer
The Health TV Channel, Inc.
(a non - profit organization)
3820 Lake Otis Parkway
Anchorage, AK 99508
907.770.6200 ext. 686
907.336.6205 (fax)
E-mail: [EMAIL PROTECTED]
Web: www.healthtvchannel.org
Louie Miranda [EMAIL
You can't use variables inside single quotes, either.
This:
'/path/to/old.$today'
ought to be:
/path/to/old.$today
--
Matt Grimm
Jas [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
I think I must be missing something but this command isn't renaming the
file specified... Pointers
If my server has an open_basedir restriction in place for my home directory,
I understand that to mean I can only open files in the same directory as
whatever script is currently running. Is that correct?
--
Matt Grimm
Web Developer
The Health TV Channel, Inc.
(a non - profit organization)
3820
Can anyone clarify this for me? Is open_basedir recursive or restricted to
the exact paths specified?
--
Matt Grimm
Matt Grimm [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
If my server has an open_basedir restriction in place for my home
directory,
I understand that to mean I
- $l_iMod : $l_iHigh);
$l_iThird = $l_iLow;
echo pstrongYour columns are: $l_iFirst, $l_iSecond,
$l_iThird/strong/p;
--
Matt Grimm
Web Developer
The Health TV Channel, Inc.
(a non - profit organization)
3820 Lake Otis Parkway
Anchorage, AK 99508
907.770.6200 ext. 686
907.336.6205 (fax)
E-mail
$l_iSecond = ($l_iMod 2 ? $l_iHigh - $l_iMod : $l_iHigh);
This should actually be:
$l_iSecond = ($l_iMod == 1 ? $l_iHigh - $l_iMod : $l_iHigh);
but it works both ways.
--
Matt Grimm
Web Developer
The Health TV Channel, Inc.
(a non - profit organization)
3820 Lake Otis Parkway
Anchorage, AK
the code will give you. If you want, echo the other variables and it
will make more sense.
--
Matt Grimm
Dareal Hamsta [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
I get:
Your columns are: 102, 101, 101
???
The other problem with this solution is that it's for a static number
columns first
for ($i = 0; $i $l_iMod; $i++) {
$l_aTable[column$i] = $l_iHigh;
}
// Do the rest
for ($i = count($l_aTable); $i $l_iColumnWidth; $i++) {
$l_aTable[column$i] = $l_iLow;
}
echo 'preResult:br /'; print_r($l_aTable);
--
Matt Grimm
Dareal Hamsta [EMAIL PROTECTED] wrote
In the very simplest way? Just use a str_replace on the quotes:
$words=explode( , str_replace('', '', strtolower($keywords)));
--
Matt Grimm
Web Developer
The Health TV Channel, Inc.
(a non - profit organization)
3820 Lake Otis Parkway
Anchorage, AK 99508
907.770.6200 ext. 686
907.336.6205 (fax
Close. You need to adjust for the length of your pattern. So if you're
matching against !- start -, then your actual start position (minus the
start comment) is the strpos plus strlen($pattern), or 14 in this case.
$startPos = strpos($file, '!- start -') + 14;
--
Matt Grimm
Web Developer
string);
--
Matt Grimm
Web Developer
The Health TV Channel, Inc.
(a non - profit organization)
3820 Lake Otis Parkway
Anchorage, AK 99508
907.770.6200 ext. 686
907.336.6205 (fax)
E-mail: [EMAIL PROTECTED]
Web: www.healthtvchannel.org
Vernon [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
I
not
indicate whether the user accepted the cookie.
http://us2.php.net/manual/en/function.setcookie.php
--
Matt Grimm
Web Developer
The Health TV Channel, Inc.
(a non - profit organization)
3820 Lake Otis Parkway
Anchorage, AK 99508
907.770.6200 ext. 686
907.336.6205 (fax)
E-mail: [EMAIL PROTECTED
://us3.php.net/manual/en/features.remote-files.php
--
Matt Grimm
Web Developer
The Health TV Channel, Inc.
(a non - profit organization)
3820 Lake Otis Parkway
Anchorage, AK 99508
907.770.6200 ext. 686
907.336.6205 (fax)
E-mail: [EMAIL PROTECTED]
Web: www.healthtvchannel.org
D.H. [EMAIL PROTECTED
script that you can find here,
although it may be more than you are looking for:
http://www.devdump.com/phpxml.php
I've written a DOMXML-based PHP - XML function that takes Kris' structure
as input, if you're interested.
--
Matt Grimm
Web Developer
The Health TV Channel, Inc.
(a non - profit
PHP manual recommends this, which works for me:
// Unset all of the session variables
$_SESSION = array();
// Destroy the session
session_destroy();
--
Matt Grimm
Web Developer
The Health TV Channel, Inc.
(a non - profit organization)
3820 Lake Otis Parkway
Anchorage, AK 99508
907.770.6200 ext
-files.php
--
Matt Grimm
Web Developer
The Health TV Channel, Inc.
(a non - profit organization)
3820 Lake Otis Parkway
Anchorage, AK 99508
907.770.6200 ext. 686
907.336.6205 (fax)
E-mail: [EMAIL PROTECTED]
Web: www.healthtvchannel.org
Bruce [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED
The directive session.cookie_lifetime in your php.ini is what a session
cookie timeout defaults to. You can manually set the lifetime when you
create it using session_set_cookie_params().
http://us3.php.net/manual/en/function.session-set-cookie-params.php
--
Matt Grimm
Web Developer
The Health
Your subject line raises a completely different question than your message.
Are you looking to sort a multi-dimensional array or select distinct
values from one?
--
Matt Grimm
Web Developer
The Health TV Channel, Inc.
(a non - profit organization)
3820 Lake Otis Parkway
Anchorage, AK 99508
-parse that post data and create a duplicate record. How can I
prevent this? Cache control?
Thanks,
--
Matt Grimm
Web Developer
The Health TV Channel, Inc.
(a non - profit organization)
3820 Lake Otis Parkway
Anchorage, AK 99508
907.770.6200 ext. 686
907.336.6205 (fax)
E-mail: [EMAIL PROTECTED
And nevermind, problem solved in another thread.
--
Matt Grimm
Web Developer
The Health TV Channel, Inc.
(a non - profit organization)
3820 Lake Otis Parkway
Anchorage, AK 99508
907.770.6200 ext. 686
907.336.6205 (fax)
E-mail: [EMAIL PROTECTED]
Web: www.healthtvchannel.org
Matt Grimm [EMAIL
source is here:
http://www.healthtvchannel.org/test/php2xml.phps
--
Matt Grimm
Web Developer
The Health TV Channel, Inc.
(a non - profit organization)
3820 Lake Otis Parkway
Anchorage, AK 99508
907.770.6200 ext. 686
907.336.6205 (fax)
E-mail: [EMAIL PROTECTED]
Web: www.healthtvchannel.org
Tom Rogers
Interesting -- the clone_node() function does make certain that each element
gets its own representation in the output, for any XML I tested. I guess
then my problem lies with how I'm looping through the aforementioned array
structure to get the values themselves.
Thanks,
--
Matt Grimm
Web
and
distinguishing them with attributes.
I'd still like the code to work with XML that did have similarly named
elements in the same node level.. can you see anything in my DOMXML calls
that might indicate the problem?
Source:
http://www.healthtvchannel.org/test/php2xml.phps
--
Matt Grimm
Web Developer
] = Value 2
)
)
)
)
)
[/array]
Source:
http://www.healthtvchannel.org/test/php2xml.phps
Thanks,
--
Matt Grimm
Web Developer
The Health TV Channel, Inc.
(a non - profit organization)
3820 Lake Otis Parkway
Anchorage, AK
I failed to show the output XML in my last message. It's outputting like
so:
[xml]
rootElement
record id=2Value1Value2/record
/rootElement
[/xml]
--
Matt Grimm
Matt Grimm [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
I have a final kink to work out of an array to XML parser
is
outputting this:
rootElement
record id=2Value 1Value 2/record
/rootElement
Any ideas?
--
Matt Grimm
Web Developer
The Health TV Channel, Inc.
(a non - profit organization)
3820 Lake Otis Parkway
Anchorage, AK 99508
907.770.6200 ext. 686
907.336.6205 (fax)
E-mail: [EMAIL PROTECTED]
Web
level, I'm overwriting the $thisChild object that I just
created. How can I dynamically name these objects so that I can have an
indeterminate number of elements by the same name, in the same level?
Source:
http://www.healthtvchannel.org/test/php2xml.phps
Thanks,
--
Matt Grimm
Web Developer
to a member function on a non-object How can I
reference that ancestor object when I come back into the function?
(PHP version is 4.3.2, Apache 2.0.44 on Win2k)
Thanks,
--
Matt Grimm
Web Developer
The Health TV Channel, Inc.
(a non - profit organization)
3820 Lake Otis Parkway
Anchorage, AK 99508
First, make sure to use str_replace whenever possible instead of
ereg_replace. It's faster:
$out_file = str_replace(http://;, , $in_file);
etc...
--
Matt Grimm
Web Developer
The Health TV Channel, Inc.
(a non - profit organization)
3820 Lake Otis Parkway
Anchorage, AK 99508
907.770.6200 ext
']) {
echo ?newVar=1;
}
?
link description text/a
Please tell me there is some way to just append to the query string without checking
it first...
--
Matt Grimm
Web Developer
The Health TV Channel, Inc.
(a non - profit organization)
3820 Lake Otis Parkway
Anchorage, AK 99508
907.770.6200 ext. 686
'] . '?' . @$_SERVER['QUERY_STRING'] .
'amp;newVar=1';
Now I can just throw in a conditional like below to make sure I'm not
duplicating the newVar in my query string. Thanks!
--
Matt Grimm
- Original Message -
From: CPT John W. Holmes [EMAIL PROTECTED]
To: Matt Grimm [EMAIL PROTECTED]; [EMAIL
PHP random functions? So I'm *not*
required to seed any of them?
Thanks,
--
Matt Grimm
You could put the vars into an array, and use the max fcn:
$limit = max($varArray);
foreach($varArray as $value) {
if ($value == $limit) {
// run something
}
}
--
Matt Grimm
Web Developer
The Health TV Channel, Inc.
(a non - profit organization)
3820 Lake Otis Parkway
Anchorage
41 matches
Mail list logo