I'm experiencing a slight problem with importNODE putting unwanted
carriage returns in the the output.
Here's my function:
// syntax highlighting
include_once('Text/Highlighter.php');
function syntaxHighlight($dom,$lang,$code) {
$hl = Text_Highlighter::factory($lang);
$out =
Michael A. Peters wrote:
The only (untried) solution I can think of is to replace each carriage
return with a br / and every space with #160; and then replace the
pre with a div class='monospace' or some such hackery before running
loadXML() on it. But I would rather not do that.
Even
highlight_string() function might be an easier route?
Op 1/25/10 9:55 AM, Michael A. Peters schreef:
I'm experiencing a slight problem with importNODE putting unwanted
carriage returns in the the output.
Here's my function:
// syntax highlighting
include_once('Text/Highlighter.php');
Hi,
Can anyone point me to tutorials on how to change a filename for each
download? My goal is to give the downloader a random name for a picture or a
document, so he will never know what the original filename is.
Regards,
Summi
--
PHP General Mailing List (http://www.php.net/)
To
SED wrote:
Hi,
Can anyone point me to tutorials on how to change a filename for each
download? My goal is to give the downloader a random name for a picture or a
document, so he will never know what the original filename is.
http://uk.php.net/manual/en/function.tempnam.php any use ...
--
Jochem Maas wrote:
highlight_string() function might be an easier route?
If I only ever wanted to highlight php it might be.
I found a workaround, though I don't like it.
add
$dom-formatOutput = false;
to the function and it displays perfectly, though viewing the generated
source isn't as
Hi,
Can anyone point me to tutorials on how to change a filename for each
download? My goal is to give the downloader a random name for a picture or a
document, so he will never know what the original filename is.
Try adding a Content-Disposition header:
?php
header('Content-disposition:
On Mon, 2010-01-25 at 10:03 +, SED wrote:
Hi,
Can anyone point me to tutorials on how to change a filename for each
download? My goal is to give the downloader a random name for a picture or a
document, so he will never know what the original filename is.
Regards,
Summi
I
Richard Quadling wrote:
2010/1/22 Pete Ford p...@justcroft.com:
IMHO, a constant is not the correct beastie in this case - if you want it to
be different depending on the implementation then it ain't a constant!
You should probably have protected static variables in the interface, and
use the
take a look at this :
http://www.phpclasses.org/browse/package/3220.html
On Mon, Jan 25, 2010 at 11:32 AM, Ashley Sheridan
a...@ashleysheridan.co.ukwrote:
On Mon, 2010-01-25 at 10:03 +, SED wrote:
Hi,
Can anyone point me to tutorials on how to change a filename for each
download?
2010/1/25 Pete Ford p...@justcroft.com:
Richard Quadling wrote:
2010/1/22 Pete Ford p...@justcroft.com:
IMHO, a constant is not the correct beastie in this case - if you want it
to
be different depending on the implementation then it ain't a constant!
You should probably have protected
Hi.
I'm in the process of building a web service which incorporates the
ability for the server to inform the client that a particular call has
been superseded by another.
So, cut down (I've removed all the other details), ...
class ServiceDetails
{
/**
* Superseded by
Richard Quadling wrote:
Hi.
I'm in the process of building a web service which incorporates the
ability for the server to inform the client that a particular call has
been superseded by another.
So, cut down (I've removed all the other details), ...
class ServiceDetails
{
PHP does expose sys V shared-memory apis (shm_* functions):
http://us2.php.net/manual/en/book.sem.php
If you already have apc installed, you could also try:
http://us2.php.net/manual/en/book.apc.php
APC also allows you to store user specific data too (it will be in a
shared memory).
Haven't
Hello there,
A friend called me today and was wondering what happens if the ID colomn of
an MYSQL database, set to autoinc reaches the int limit. Will it return and
begin choosing the ID's that have been deleted, or... what?
Thanks!
--
PHP General Mailing List (http://www.php.net/)
To
Parham Doustdar wrote:
Hello there,
A friend called me today and was wondering what happens if the ID colomn of
an MYSQL database, set to autoinc reaches the int limit. Will it return and
begin choosing the ID's that have been deleted, or... what?
you change it to bigint before that happens
It will continue to use the max number which of course will cause an error.
Joseph
Parham Doustdar wrote:
Hello there,
A friend called me today and was wondering what happens if the ID colomn of
an MYSQL database, set to autoinc reaches the int limit. Will it return and
begin choosing the
On 1/25/2010 1:19 PM, Nathan Rixham wrote:
Parham Doustdar wrote:
Hello there,
A friend called me today and was wondering what happens if the ID colomn of
an MYSQL database, set to autoinc reaches the int limit. Will it return and
begin choosing the ID's that have been deleted, or... what?
Parham Doustdar wrote:
Hello there,
A friend called me today and was wondering what happens if the ID colomn of
an MYSQL database, set to autoinc reaches the int limit. Will it return and
begin choosing the ID's that have been deleted, or... what?
Thanks!
Ask Slashdot... I believe they hit
On Thu, 21 Jan 2010 08:43:58 +1100, clanc...@cybec.com.au wrote:
When you are working with sessions, provided you start your program with
session_id(), you
can then do anything you like with session variables at any point in your
program. In my
original question I asked if there was a
On Mon, 2010-01-25 at 22:13 +0100, Nisse Engström wrote:
On Thu, 21 Jan 2010 08:43:58 +1100, clanc...@cybec.com.au wrote:
When you are working with sessions, provided you start your program with
session_id(), you
can then do anything you like with session variables at any point in your
On Mon, Jan 25, 2010 at 17:15, Parham Doustdar parha...@gmail.com wrote:
Hello there,
A friend called me today and was wondering what happens if the ID colomn of
an MYSQL database, set to autoinc reaches the int limit. Will it return and
begin choosing the ID's that have been deleted, or...
For such a large data set, they would split into several sub tables,
otherwise the performance will be horrible
On Mon, Jan 25, 2010 at 3:39 PM, Robert Cummings rob...@interjinn.comwrote:
Parham Doustdar wrote:
Hello there,
A friend called me today and was wondering what happens if the ID
That is incorrect. What will happen is as follows:
1. The value will be incremented by 1 causing the value to be greater
than the maximum integer allowed.
2. MySQL will see this as a problem and truncate it to the closest value.
3. MySQL will then try and insert the new row with the
On Mon, Jan 25, 2010 at 18:51, Joseph Thayne webad...@thaynefam.org wrote:
That is incorrect. What will happen is as follows:
1. The value will be incremented by 1 causing the value to be greater than
the maximum integer allowed.
2. MySQL will see this as a problem and truncate it to the
On Mon, 25 Jan 2010 21:26:05 +, Ashley Sheridan wrote:
On Mon, 2010-01-25 at 22:13 +0100, Nisse Engström wrote:
The HTTP spec allows cookies to be sent after the content,
in trailing headers, but it's not usable practically. Few
browsers support it, and PHP certainly doesn't. You'd have
Good Day,
I'm having an issue with IE8, when I go to load a file the
program is not filling the $_FILES['user_file']['type'] .
When I display echo Start.$_FILES['pix']['type'].End;
in IE8 I get StartEnd with nothing in between. I expected image/pjpeg.
'Twas brillig, and Richard Quadling at 22/01/10 11:33 did gyre and gimble:
Hello,
One of the aspects of an interface is to enforce a public view of a
class (as I see it).
Within PHP, interfaces are allowed to have constants, but you cannot
override them in a class implementing that
On Mon, 2010-01-25 at 17:41 -0500, Ernie Kemp wrote:
Good Day,
I’m having an issue with IE8, when I go to load a file
the program is not filling the $_FILES['user_file']['type'] .
When I display “echo Start.$_FILES['pix']['type'].End;”
in IE8
124
__ Información de ESET NOD32 Antivirus, versión de la base de firmas de
virus 4805 (20100125) __
ESET NOD32 Antivirus ha comprobado este mensaje.
http://www.eset.com
On Tue, Jan 26, 2010 at 6:41 AM, Ernie Kemp ernie.k...@sympatico.ca wrote:
Good Day,
I’m having an issue with IE8, when I go to load a file the
program is not filling the $_FILES['user_file']['type'] .
When I display “echo
J Ravi Menon wrote:
PHP does expose sys V shared-memory apis (shm_* functions):
http://us2.php.net/manual/en/book.sem.php
I will look into this. I really need a key/value map, though and would
rather not have to write my own on top of SHM.
If you already have apc installed, you could
On Tue, 2010-01-26 at 07:33 +0800, Eric Lee wrote:
On Tue, Jan 26, 2010 at 6:41 AM, Ernie Kemp ernie.k...@sympatico.ca wrote:
Good Day,
I’m having an issue with IE8, when I go to load a file the
program is not filling the $_FILES['user_file']['type'] .
From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk]
Sent: January-25-10 5:53 PM
To: Ernie Kemp
Cc: 'PHP General List'
Subject: Re: [PHP] Upload file on IE8
On Mon, 2010-01-25 at 17:41 -0500, Ernie Kemp wrote:
Good Day,
I’m having an issue with IE8,
On Mon, 2010-01-25 at 19:21 -0500, Ernie Kemp wrote:
From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk]
Sent: January-25-10 5:53 PM
To: Ernie Kemp
Cc: 'PHP General List'
Subject: Re: [PHP] Upload file on IE8
On Mon, 2010-01-25 at 17:41 -0500, Ernie Kemp wrote:
Hi Folks,
I would like to create an entire .html page gathered from database
content mixed with html etc. and be able to save the page...
like:
--- save all this pre made content as .html page
html
head
... stuff
/head
body
... stuff
... stuff with database query results...
...
On Mon, 2010-01-25 at 17:00 -0800, deal...@gmail.com wrote:
Hi Folks,
I would like to create an entire .html page gathered from database
content mixed with html etc. and be able to save the page...
like:
--- save all this pre made content as .html page
html
head
... stuff
- Original Message -
From: deal...@gmail.com
To: PHP-General php-general@lists.php.net
Sent: Tuesday, January 26, 2010 11:00 AM
Subject: [PHP] Creating an Entire .html page with PHP
Hi Folks,
I would like to create an entire .html page gathered from database
content mixed with html
On 1/25/2010 8:00 PM, deal...@gmail.com wrote:
Hi Folks,
I would like to create an entire .html page gathered from database
content mixed with html etc. and be able to save the page...
like:
--- save all this pre made content as .html page
html
head
... stuff
/head
body
... stuff
...
values were stored, the APC storage began to slow down *dramatically*. I
wasn't certain if APC was using only RAM or was possibly also writing to
disk. Performance tanked so quickly that I set it aside as an option and
moved on.
IIRC, i think it is built over shm and there is no disk backing
On Jan 25, 2010, at 4:59 PM, Ashley Sheridan wrote:
$fh = fopen(page.html,w);
fwrite($fh, $htmlcode);
Thanks so much Ashley and ALL, this looks like it will work fine.
BTW: Sorry if I didn't make myself clear - I just wanted to grab some
data like a person from a contacts file and be
Joseph Thayne wrote:
That is incorrect. What will happen is as follows:
1. The value will be incremented by 1 causing the value to be greater
than the maximum integer allowed.
2. MySQL will see this as a problem and truncate it to the closest
value.
3. MySQL will then try and insert
deal...@gmail.com wrote:
On Jan 25, 2010, at 4:59 PM, Ashley Sheridan wrote:
$fh = fopen(page.html,w);
fwrite($fh, $htmlcode);
Thanks so much Ashley and ALL, this looks like it will work fine.
BTW: Sorry if I didn't make myself clear - I just wanted to grab some
data like a
On Jan 25, 2010, at 6:23 PM, Shawn McKenzie wrote:
file_put_contents() is s much easier.
Thanks Shawn I'll check that out ...
- I see it says : This function is identical to calling fopen(),
fwrite() and fclose() successively to write data to a file.
my newbie brain likes that!
I am reading the manual: http://ca.php.net/manual/en/ref.strings.php
$mydata-restored = -00-00;
How do I express this? If the first four characters are , then do {}
What I am looking for is in strpos(), no?
if ()
{
}
--
PHP General Mailing List (http://www.php.net/)
To
On Mon, Jan 25, 2010 at 21:36, John Taylor-Johnston
john.taylor-johns...@cegepsherbrooke.qc.ca wrote:
I am reading the manual: http://ca.php.net/manual/en/ref.strings.php
$mydata-restored = -00-00;
?php
$o[] = '0942-23-23';
$o[] = '-00-00';
$o[] = '1238-00-00';
$o[] = '0001-23-45';
- Original Message -
From: John Taylor-Johnston john.taylor-johns...@cegepsherbrooke.qc.ca
To: PHP-General php-general@lists.php.net
Sent: Tuesday, January 26, 2010 12:36 PM
Subject: [PHP] If the first four characters are , then do {}
I am reading the manual:
Shawn McKenzie wrote:
Joseph Thayne wrote:
That is incorrect. What will happen is as follows:
1. The value will be incremented by 1 causing the value to be greater
than the maximum integer allowed.
2. MySQL will see this as a problem and truncate it to the closest
value.
3. MySQL will then
On Sun, Jan 24, 2010 at 16:16, David W. Allor da...@artisanpath.com wrote:
Hi!
I'm using php-cli 5.3.1.
When I run php from the command line, the script does not return me to
the command prompt when exited. The script always completes, but it has
to be killed to release it's resources.
On Mon, Jan 25, 2010 at 10:00 PM, Michael A. Peters mpet...@mac.com wrote:
Shawn McKenzie wrote:
Joseph Thayne wrote:
That is incorrect. What will happen is as follows:
1. The value will be incremented by 1 causing the value to be greater
than the maximum integer allowed.
2. MySQL will
Like you, I have many little functions that are useful for debugging in a
page.
The problem is that when you start to pepper them around, whilst debugging,
you can often times forget where you left them. A search isn't always
helpful since I sometimes leave them in the code, but commented out, so
Hello list :)
I have this problem, a certain string can contain the following information:
$string = '
hi{value1;value2}
bye{value1;value3}
hi{value1;value4}
hi{value1;value2}
bye{value1;value2}
';
What I want is to be able to get this result:
$string = '
hi{value1;value2}
bye{value1;value3}
-Original Message-
From: paras...@gmail.com [mailto:paras...@gmail.com] On
Behalf Of Daniel Brown
Sent: Monday, January 25, 2010 6:43 PM
To: John Taylor-Johnston
Cc: PHP-General
Subject: Re: [PHP] If the first four characters are , then do {}
On Mon, Jan 25, 2010 at 21:36,
Hey all,
I have an SQL query that's stumping me.
I have two date variables, $start and $end that are in
mm/dd/ format and two database fields, start_date and
no_donations. The start date is mm/dd/ format and
no_donations is an integer that represents the number of
months from
Daevid Vincent wrote:
Like you, I have many little functions that are useful for debugging in a
page.
The problem is that when you start to pepper them around, whilst debugging,
you can often times forget where you left them. A search isn't always
helpful since I sometimes leave them in the
Hi all.
I'm currently using the phpmailer class from phpmailer.worxware.com to send
datatbase -populated emails to clients.
At the moment I'm runninng PHP on Windows and using the built-in sendmail
equivalent packaged with XAMPP. It uses a remote SMTP that authenticates by
prior logging into
On Mon, Jan 25, 2010 at 09:36:50PM -0500, John Taylor-Johnston wrote:
I am reading the manual: http://ca.php.net/manual/en/ref.strings.php
$mydata-restored = -00-00;
How do I express this? If the first four characters are , then do {}
What I am looking for is in strpos(), no?
if
On Mon, Jan 25, 2010 at 10:59:43PM -0500, Robert Cummings wrote:
Daevid Vincent wrote:
Like you, I have many little functions that are useful for debugging in a
page.
The problem is that when you start to pepper them around, whilst debugging,
you can often times forget where you left them.
-Original Message-
From: Paul M Foster [mailto:pa...@quillandmouse.com]
Sent: Monday, January 25, 2010 8:05 PM
To: php-general@lists.php.net
Subject: Re: [PHP] If the first four characters are , then do {}
On Mon, Jan 25, 2010 at 09:36:50PM -0500, John Taylor-Johnston wrote:
On Tue, Jan 26, 2010 at 02:02:18PM +1000, Angus Mann wrote:
Hi all.
I'm currently using the phpmailer class from phpmailer.worxware.com to send
datatbase -populated emails to clients.
At the moment I'm runninng PHP on Windows and using the built-in sendmail
equivalent packaged with
On Mon, Jan 25, 2010 at 11:12 PM, Daevid Vincent dae...@daevid.com wrote:
From what I understand, strpos() faster than a lot of other similar
string functions and much faster than regexps. You could do:
if (strpos($mydata-restored, '') === 0) {
do_stuff();
}
Ah. Clever use of the
On Mon, Jan 25, 2010 at 09:54:40PM -0600, Skip Evans wrote:
Hey all,
I have an SQL query that's stumping me.
I have two date variables, $start and $end that are in
mm/dd/ format and two database fields, start_date and
no_donations. The start date is mm/dd/ format and
no_donations
On Mon, Jan 25, 2010 at 08:12:43PM -0800, Daevid Vincent wrote:
-Original Message-
From: Paul M Foster [mailto:pa...@quillandmouse.com]
Sent: Monday, January 25, 2010 8:05 PM
To: php-general@lists.php.net
Subject: Re: [PHP] If the first four characters are , then do {}
Paul M Foster wrote:
Typically, coders try to store dates in unix timestamps internally, and
then add 86400 seconds for every day to calculate intervals and such.
This is often inaccurate. Julian days are far more accurate.)
Paul
I use seconds from epoch in the database simply because it
Michael A. Peters wrote:
If you need something where Julian day really is better, I assume it
isn't that hard to convert between posix and julian day, though it seems
odd to me that it isn't part of the date() function. It probably should be.
Looks like unixtojd() and jdtounix() do it.
65 matches
Mail list logo