p the Make if there's a syntax error.)
By the way, once I get this all working, I'll release the build system (not
what it builds, however) as open-source for whoever wants it. It's going to
be quite handy IMHO.
-- Daniel Grace
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
rther research into this, I periodically hear something
about an issue between Apache and PDF, but I don't know the details of
that. It's possible the problems are related -- if so, there may be a fix
somewhere on the Apache site.
-- Daniel Grace
- Original Message -
From: "Dy
Be warned that explode won't work as expected if any of your fields contain
colons, though it doesn't look like it'll be an issue in this sort of case.
"Gaylen Fraley" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Use the explode() function based on the colon
and thus someone with access to the history can determine
their username/password. POST would really be a better method to use here in
this case.
-- Daniel Grace
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
e continue(2) is actually a tiny tiny bit
slower (we're talking around 0.010s over a 1-iteration loop on a 700 mhz
machine here) than doing it by hand the old way. With an amount that small
though, I'm more inclined to believe it's just statistical error/random
variance than anything else.
-- Daniel Grace
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
se I pondered the idea of maybe writing a Win32
API extension for PHP)
And a loop in PHP isn't exactly non-typical. I'd need more fingers and toes
to count how many times I've wrote "while($row = mysql_fetch_assoc($result))
{ ... }"
-- Daniel Grace
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ect the output made -- wasn't noticeable) and forgot
to remove them when c+p'ing the source to the newsgroup.
-- Daniel Grace
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
This all started in a little debate between me and a friend of mine who I
think is as much a PERL zealot as I am a PHP zealot (I was briefly pondering
the idea of a Win32 API extension for PHP), and the results were rather
surprising -- to me, at least..
It all started when I asked him what PERL
long
time...it adds up real fast!). If the ability to raise the connection limit
isn't available, you may want to use mysql_connect instead -- slightly
slower, but you won't have to worry about unused connections lingering.
(It's still possible to hit the limit, though, just not as l
s perfect, except that I don't want to take the last
> element off the end. Otherwise I would definitely use it.
>
> Erik
>
$array = array_values($array) will re-index your array without the need for
array_pop and array_push.
-- Daniel Grace
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
our script can handle $email being empty, simply adjust your level of
error-reporting or silence the warning with an @. Otherwise, fix whatever
it is that's causing $email to be empty.
-- Daniel Grace
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
header from being sent and I'm not being allowed to
override it.
Maybe in some later version we'll get the ability to either fine-tune what
headers the Session handler sends, or the ability to directly modify what's
being sent for headers? Pleeease?
-- Daniel Grace
(my original me
gt;
As for the median value, there's a relatively easy way to do this in PHP:
1. Sort the array (sort())
2. Count the number of elements in the array (count())
3. Take the element that is equal to half the number of the elements
(rounded to an int, which way you round doesn't matter)
nding my own cache-control headers with header() either merges them
with the ones the session_start sends, or does absolutely nothing (verified
by doing a GET /url HTTP/1.0 via telnet to port 80), regardless of whether
the header occurs before or after the session_start.
-- Daniel Grace
P.S. The P
orben
That being said, break only breaks out of looping constructs. A break placed
within an if-block will break out of the loop around it. There isn't a
direct way to break out of an if-block alone (if that's your intent), though
this will work:
do {
if(condition) {
...
"Manuel Ritsch" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hey There
>
> I have a little question
>
> I'm making a page where you can download mp3's (hip hop and funk beats
made
> by myself) and i want, if you press on the
> link (), that it doesn't start a
riables, your current way is fine.
By the way, you may wish to consider using 'here documents':
echo << will work just fine. For more about
Here Documents, take a look at here:
http://www.php.net/manual/en/language.types.string.php
XYZZY;
-- Daniel Grace
--
PHP General Mail
"Jon" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Nevermind, I found some code at last which actually works :
>
> $txt = preg_replace("/(\015\012)|(\015)|(\012)/","",$txt);
>
rather than using a regular expression, try:
$txt = strtr($txt, array("\r\n" =>
each 'piece' to the output
buffer/to the browser one by one rather than having to go through the work
of building one large string and then outputting that.
Caveats: This won't work if you use the function-like syntax for echo <<
echo(foo, bar, baz) /* this won't work
There is one other option if you're willing to take a slight drop in
performance. Take a quick look at:
http://www.php.net/manual/en/ref.outcontrol.php
-- Daniel Grace <[EMAIL PROTECTED]>
"Richard Crawford" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]"
know whether it's too long) is combine both #1 and #2 and actually
pull the first 150-200 characters from the database, which should be enough
to deal with most HTML escapes without dumping the entire table.
-- Daniel Grace <[EMAIL PROTECTED]>
--
PHP General Mailing List (http
"Jason Wong" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> On Tuesday 15 January 2002 17:24, Daniel Grace wrote:
> > Is there an equivalent to the php_ini directive available for the CGI
> > version >
> Some settings in php.ini can
#x27;
>spot. Here is my SQL query:
>
>select * from employees order by fname;
>
>Should I create an array and sort it there or can I somehow query MySQL to
>sort by nickname only if it exists and then by fname?
>
>Dean
>
>
SELECT IF(nickname IS NOT NULL AND nickname !
ache
group says not to modify...)
-- Daniel Grace <[EMAIL PROTECTED]>
Please CC me in replies
--
PHP General 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]
"R. Elsenaar" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi,
>
> To get the title of an external page to put into a link, has somebody did
> that already and can give me some hints for this trick
>
> Robert
>
>
// Your question managed to spark my interes
) the expression's value is returned, not before.
In other words, it's equivalent to this:
print $foo;
$foo = $foo + 1;
not this:
$foo = $foo + 1;
print $foo;
-- Daniel Grace
--
PHP General 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]
SQL if
you want to use that for storing it in the database)
mktime(0, 0, 0, $month, $day, $year) should do the trick
-- Daniel Grace
--
PHP General 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]
>
> I want to add --with-imap, but have no idea how to determine what the
current settings are.
>
>
> Larentium
phpinfo() shows you the configure command.
If you have the PHP CGI and are running on *nix or something like such, you
can also.
/path/to/php -i | grep ./configure
-- D
"David Jackson" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> All --
> It appears that the problem was a table design problems,
> my primary index wasn't set to auto-increment? So I was trying to
> insert records with duplicate keys !!
> This of course leads
"Paul Burney" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> on 12/16/01 12:58 PM, Daniel Grace at [EMAIL PROTECTED] wrote:
>
> > Anyways, though the 401 part works and actually brings up the typical
"Enter
>
heck to see if that's the problem, short of checking
php.ini, is to make a quick and dirty test page:
If you can see this, then short_open_tags = off. Of course, if phpinfo()
is displayed above, this should be fairly obvious <*/
?>
<%
/* >If you can see this, then asp_style_tags =
the directory (or any parent dirs for that
matter), and no AuthType directives all in my httpd.conf file. I have been
unsuccessful in determining what is wrong, and am flat out of ideas.
My php.ini and httpd.conf files are available at
http://hosting.venura.net/fixme/
Any ideas?
-- Daniel Grace
are no .htaccess files in the directory (or any parent dirs for that
matter), and no AuthType directives all in my httpd.conf file. I have been
unsuccessful in determining what is wrong, and am flat out of ideas.
My php.ini and httpd.conf files are available at
http://hosting.venura.net/fixme
NOT the name of the original file. You'll want to use $photo_file_name
to determine the original filename, or better yet, $photo_file_type to
determine the content type. (a gif is image/gif, for instance).
See http://www.php.net/manual/en/features.file-upload.php
--
Daniel Grace
echo make_witty_
more general info on persistent connections).
With persistent connections, the overhead in connecting to the database
backend is minimized since the same connection can be shared across multiple
pages. This won't work with the CGI version of PHP however.
- Daniel Grace <http://dewin.oldbattery.c
=1) echo("fred") else echo("bill"):
> should work but doesn't.
>
if (1==1) echo("fred"); else echo("bill"):
--^
You need to have a semicolon before the else.
- Daniel Grace <http://dewin.oldbattery.com/>
--
was once (and still am)
interested in developing a MUD (= multi-user text-based game) engine
entirely in PHP. This would be nice because powerful scripts and stuff like
that could be coded within the mud and executed on-the-fly if proper
considerations were taken towards stability and securit
On Wednesday, January 31, 2001 at 12:00 PM, "Boaz Yahav"
<[EMAIL PROTECTED]> wrote:
> Seems like your theory doesn't stand the reality test :)
>
> This is the script which for some reason works with Netscape but not with
IE
> (it used to) :
>ignore_user_abort(0);
>$filename="test.gz";
>
mplode(", ",
$idlist) . ")");
Making sure $idlist actually contains at least one item (if it doesn't the
second query will fail) is left as an exercise to the reader.
--
- Daniel Grace <http://dewin.oldbattery.com/>
"Space may be the final frontier but
3. If the user aborts right after the file_did_download() function is called
but before the script actually terminates, things can go awry. I'm not
entirely sure how this would be handled.
--
- Daniel Grace <http://dewin.oldbattery.com/>
"Space may be the final frontier but its
On Tuesday, January 30, 2001 at 3:04 PM, Alexandar Skwar wrote:
> So sprach Daniel Grace am Thu, Jan 25, 2001 at 07:18:52PM -0800:
> > readfile($filename);
>
> Why not include?
>
Because include will execute any PHP code in the included file and readfile
will not, it just dum
Any of these will work:
echo implode("\n", file($filename));
fpassthru(fopen($filename, "r"));
readfile($filename);
You probably want readfile().
http://www.php.net/manual/en/function.readfile.php
--
- Daniel Grace <http://dewin.oldbattery.com/>
"Space ma
long as you're not inside a table),
you'll either need to do:
ob_implicit_flush(1);
// at the beginning of the script (use 0 to turn it back off)
or:
flush(); // after the echo and before the sleep.
Side note: When you're using PHP for shell scripts (Don't look at me like
es to it and
have to send them to the mailing list.
Is there any easy way to post to the group instead?
--
- Daniel Grace <http://dewin.oldbattery.com/>
"Space may be the final frontier but its made in a Hollywood basement."
- Red Hot Chili Peppers - Californication
've been doing the last couple weeks.) However,
I think NoteTab is written with the html author/developer.
DISCLAIMER: The author of this email is in no way shape or form affiliated
with NoteTab and/or it's authors, except for happening to love the program.
Side note: Out of all th
laying games that
are run via a message board system -- see
http://dewin.oldbattery.com/venura/ )), but I am interested to see what
people think.
- Daniel Grace <http://dewin.oldbattery.com/>
"Space may be the final frontier but its made in a Hollywood basement."
- Red Hot Ch
46 matches
Mail list logo