php-general Digest 4 Sep 2009 20:12:09 - Issue 6322
Topics (messages 297663 through 297689):
Re: Some help with SimpleXML :`(
297663 by: Matthew Croud
297664 by: J DeBord
Re: What type of barcode used for document management system ?
297665 by: Sam Stelfox
how to
Hi, I'm new to using barcode
I want to create an online registration in my application, where the user
can fill in the form and the application will create a pdf file of the form
with the barcode inserted on it. The user then brings the printed form to us
and we scan the barcode. After
Well, you guys are awesome.
So the script below doesn't cause any errors (nice), however it
doesn't save the newly added child to the xml file (items.xml):
$xml = simplexml_load_file(items.xml);
$item = $xml-addChild('item');
$item-addChild('name', $name);
$item-addChild('desc', $desc);
On Fri, Sep 4, 2009 at 10:23 AM, Matthew Croud m...@obviousdigital.comwrote:
Well, you guys are awesome.
So the script below doesn't cause any errors (nice), however it doesn't
save the newly added child to the xml file (items.xml):
$xml = simplexml_load_file(items.xml);
$item =
As a matter of fact... For a while I was using a barcode generator to
test out inventory system before getting them professionally made. I
personally chose to go with Interleaved 2 of 5 as our barcode scanner
was able to read them accurately and it was the same format as our
campus ID cards.
Hi all, I'm a bit under stress, maybe somebody knows the regex on a snap.
using PHP_EOL would be great.
thanks
ralph_def...@yahoo.de
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Fri, 2009-09-04 at 14:58 +0200, Ralph Deffke wrote:
Hi all, I'm a bit under stress, maybe somebody knows the regex on a snap.
using PHP_EOL would be great.
thanks
ralph_def...@yahoo.de
The regex that would match a line containing only whitespace would look
like this:
^\s*$
Thanks,
ok
preg_replace( /^\s*$/m, , $somestring)
does not take empty lines out
Ashley Sheridan a...@ashleysheridan.co.uk wrote in message
news:1252069539.24700.150.ca...@localhost...
On Fri, 2009-09-04 at 14:58 +0200, Ralph Deffke wrote:
Hi all, I'm a bit under stress, maybe somebody knows the regex
On Fri, 2009-09-04 at 15:28 +0200, Ralph Deffke wrote:
ok
preg_replace( /^\s*$/m, , $somestring)
does not take empty lines out
Ashley Sheridan a...@ashleysheridan.co.uk wrote in message
news:1252069539.24700.150.ca...@localhost...
On Fri, 2009-09-04 at 14:58 +0200, Ralph Deffke wrote:
the problem is some have got \t\n
some are just \n\n\n
using PHP_EOL is a must
I thing must be something with the /../sm attributes to the regex, spend
like half an hour, but didn't get it, I'm running against a dead line,
doesn't seem to be that easy if regex is not the everydays need u
On Fri, 2009-09-04 at 15:37 +0200, Ralph Deffke wrote:
the problem is some have got \t\n
some are just \n\n\n
using PHP_EOL is a must
I thing must be something with the /../sm attributes to the regex, spend
like half an hour, but didn't get it, I'm running against a dead line,
I'm working on DTD's
Ashley Sheridan a...@ashleysheridan.co.uk wrote in message
news:1252071932.24700.153.ca...@localhost...
On Fri, 2009-09-04 at 15:37 +0200, Ralph Deffke wrote:
the problem is some have got \t\n
some are just \n\n\n
using PHP_EOL is a must
I thing must be
On Fri, 2009-09-04 at 15:45 +0200, Ralph Deffke wrote:
I'm working on DTD's
Ashley Sheridan a...@ashleysheridan.co.uk wrote in message
news:1252071932.24700.153.ca...@localhost...
On Fri, 2009-09-04 at 15:37 +0200, Ralph Deffke wrote:
the problem is some have got \t\n
some are just
On Fri, Sep 4, 2009 at 10:37 AM, Ralph Deffke ralph_def...@yahoo.de wrote:
the problem is some have got \t\n
some are just \n\n\n
using PHP_EOL is a must
I thing must be something with the /../sm attributes to the regex, spend
like half an hour, but didn't get it, I'm running against a
this works
$dtd = preg_replace( /\n+/, \n, $dtd);
Martin Scotta martinsco...@gmail.com wrote in message
news:6445d94e0909040653i44716f79m972f11055599...@mail.gmail.com...
On Fri, Sep 4, 2009 at 10:37 AM, Ralph Deffke ralph_def...@yahoo.de
wrote:
the problem is some have got \t\n
some are
The following snippet is untested and using Ash's regex (it is accurate
\s matches any white space). $content is what is getting stripped of the
new lines and $filtered is the cleansed output. See if that does the
trick for you.
$lines = str_split(PHP_EOL, $content);
$filtered = '';
foreach
and this is the PHP_EOL solution:
$dtd = preg_replace( /[. PHP_EOL . ]+/, . PHP_EOL . , $dtd);
dont ask me why two empty strings are needed to surround the PHP_EOL but its
does it.
Why this works? we have got an INTERPRETER here any \n is transtlated into
0x0D an \r into 0x0A so the pattern does
On Fri, 2009-09-04 at 16:13 +0200, Ralph Deffke wrote:
and this is the PHP_EOL solution:
$dtd = preg_replace( /[. PHP_EOL . ]+/, . PHP_EOL . , $dtd);
dont ask me why two empty strings are needed to surround the PHP_EOL but its
does it.
Why this works? we have got an INTERPRETER here any
Daevid Vincent a écrit :
Maybe I misunderstood the OP,
OP ?
but wouldn't this (or something like it) be
easier and cleaner than that mess below??
No, it's dirty too.
$url = preg_replace(/(\...@\w+\.[a-za-z]{2,3})/i, a
href='mailto:$1'$1/a, $url);
This violate the numerous RFC about
Ashley Sheridan a écrit :
What's wrong with using the wildcards that are built into most SQL
variants?
Performance issues. Like is an operator to avoid when possible.
--
Mickaël Wolff aka Lupus Michaelis
http://lupusmic.org
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe,
On Fri, 2009-09-04 at 17:00 +0200, Lupus Michaelis wrote:
Ashley Sheridan a écrit :
What's wrong with using the wildcards that are built into most SQL
variants?
Performance issues. Like is an operator to avoid when possible.
--
Mickaël Wolff aka Lupus Michaelis
http://lupusmic.org
sono...@fannullone.us a écrit :
Here's an example: let's say there is an itemID of 4D-2448-7PS but
someone omits the dashes and searches on 4D24487PS. Is it possible in
PHP to have the find be successful, even if the search criteria doesn't
exactly match what's stored in the field?
Ashley Sheridan a écrit :
You'll have far greater performance issues if you retrieve all those
records and attempt to do the same thing inside of PHP...
It's why I speak about « avoiding » and not « bannishing ». Like can
be usefull, I used to use it. But it is not the a good answer to all
I am trying to figure out how to use ODBC with PHP.
Specifically I need to connect a php script to a SunGard Banner table
I know I need to set up some type of DNS connection, but I am not sure what
exactly that is.
[r...@dev ~]$ odbcinst -j
unixODBC 2.2.11
DRIVERS: /etc/odbcinst.ini
Hey everyone. I ran into a really weird issue that I was hoping I could
find some clarification on. In short, I have javascript functions that
operate on hidden text values. Those values may be posted, in which
case PHP then prints them back to the page via what comes in on $_POST.
The weird
On Fri, Sep 4, 2009 at 3:16 PM, James Colanninoja...@colannino.org wrote:
Hey everyone. I ran into a really weird issue that I was hoping I could
find some clarification on. In short, I have javascript functions that
operate on hidden text values. Those values may be posted, in which
case
In my readings, I've run across examples showing include files being
called from within the head/head tags, and other examples showing
them called within body/body. I've always put them in the header
section myself, but I was wondering if one is better than the other,
or is it just
From: sono-io at fannullone.us
In my readings, I've run across examples showing include files
being
called from within the head/head tags, and other examples showing
them called within body/body. I've always put them in the header
section myself, but I was wondering if one is
Andrew Ballard wrote:
Javascript interpolates \n as a newline character inside both double
and single quotes unlike PHP that only interpolates inside double
quotes. If the client browser is running under Windows, it may even be
possible that the \n is recognized by the browser as a line
On Fri, Sep 4, 2009 at 12:02 PM, Lupus
Michaelismickael+...@lupusmic.org wrote:
Ashley Sheridan a écrit :
You'll have far greater performance issues if you retrieve all those
records and attempt to do the same thing inside of PHP...
It's why I speak about « avoiding » and not « bannishing
Hi,
I have a script that intermittently fails at the same line. I am trying
to write some code that will throw an exception after 5 seconds if the
command on that line fails and the script freezes.
Any ideas?
Jim White
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe,
Eddie Drapkin wrote:
On Fri, Sep 4, 2009 at 12:02 PM, Lupus
Michaelismickael+...@lupusmic.org wrote:
Ashley Sheridan a écrit :
You'll have far greater performance issues if you retrieve all those
records and attempt to do the same thing inside of PHP...
It's why I speak about « avoiding »
-Original Message-
From: Lupus Michaelis [mailto:mickael+...@lupusmic.org]
Sent: Friday, September 04, 2009 7:46 AM
To: php-general@lists.php.net
Subject: Re: [PHP] Converting URL's to hyperlinks.
Daevid Vincent a écrit :
Maybe I misunderstood the OP,
OP ?
Original
2009/9/4 Daevid Vincent dae...@daevid.com
-Original Message-
From: Lupus Michaelis
[mailto:mickael+...@lupusmic.orgmickael%2b...@lupusmic.org
]
Sent: Friday, September 04, 2009 7:46 AM
To: php-general@lists.php.net
Subject: Re: [PHP] Converting URL's to hyperlinks.
[snip]
I have a script that intermittently fails at the same line. I am trying
to write some code that will throw an exception after 5 seconds if the
command on that line fails and the script freezes.
Any ideas?
[/snip]
I have lots of ideas! But those really won't help you :)
We need to see
$map = ms_newMapObj($mapfile);
The command creates a new mapscript object.
Jay Blanchard wrote:
[snip]
I have a script that intermittently fails at the same line. I am trying
to write some code that will throw an exception after 5 seconds if the
command on that line fails and the script
$map = ms_newMapObj($mapfile);
The command creates a new mapscript object.
And PHP is hanging somewhere inside that constructor? Is this in a web
context or a command-line context? Or both?
Bob McConnell wrote:
From: sono-io at fannullone.us
In my readings, I've run across examples showing include files
being
called from within the head/head tags, and other examples showing
them called within body/body. I've always put them in the header
section myself, but I was
It's a web app that draws maps in a browser. Sometime it will generate a
seg fault. The command should not take long, so if there is some script
construct that will throw an exception after a few seconds if the
command has not completed I could signal the user that the map will not
draw and to
Hi,
How do i access a variable from inside a class? ex. I want to use
$template_dir inside Template.
$template_dir = 'templates/';
class templateParser {
var $output;
function templateParser($templateFile='default_template.htm')
{
Hi,
Does anyone know when the stable release of PHP6 be ready for download? I
hear there's a lot of goodies in version 6 including built-in Caching.
Yum. Also, will PHP ever implement the Strict mode similar to Perl's 'using
Strict'?
Thanks,
Bobby
Lars Nielsen wrote:
Hi,
How do i access a variable from inside a class?
Add the following statement:
global $template_dir;
James
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Fri, Sep 4, 2009 at 17:42, Bobby Pejmanbpej...@gmail.com wrote:
Hi,
Does anyone know when the stable release of PHP6 be ready for download? I
hear there's a lot of goodies in version 6 including built-in Caching.
Yum. Also, will PHP ever implement the Strict mode similar to Perl's 'using
Sam Stelfox wrote:
The following snippet is untested and using Ash's regex (it is accurate
\s matches any white space). $content is what is getting stripped of the
new lines and $filtered is the cleansed output. See if that does the
trick for you.
$lines = str_split(PHP_EOL, $content);
On Fri, 04 Sep 2009 12:16:47 -0700, James Colannino wrote:
Hey everyone. I ran into a really weird issue that I was hoping I could
find some clarification on. In short, I have javascript functions that
operate on hidden text values. Those values may be posted, in which
case PHP then prints
On Sep 4, 2009, at 1:05 PM, Bob McConnell wrote:
Depends on what you are including. The only tags that can be inside
the
head are base, link, meta, script, style, and title.
Everything else is either body or prologue.
I meant PHP includes like this one:
?php
On Fri, Sep 04, 2009 at 12:16:47PM -0700, James Colannino wrote:
Hey everyone. I ran into a really weird issue that I was hoping I could
find some clarification on. In short, I have javascript functions that
operate on hidden text values. Those values may be posted, in which
case PHP then
Lars Nielsen wrote:
Hi,
How do i access a variable from inside a class? ex. I want to use
$template_dir inside Template.
$template_dir = 'templates/';
class templateParser {
var $output;
function templateParser($templateFile='default_template.htm')
{
I cant get it to work. I will use a configuration class instead.
function templateParser($templateFile='default_template.htm')
{
$c = new config();
(file_exists($c-template_dir.$templateFile)) ?
- Original Message
From: Robert Cummings rob...@interjinn.com
To: Eddie Drapkin oorza...@gmail.com
Cc: Lupus Michaelis mickael+...@lupusmic.org; php-general@lists.php.net
Sent: Friday, September 4, 2009 1:36:08 PM
Subject: Re: [PHP] Searching on AlphaNumeric Content Only
Eddie
On Fri, Sep 04, 2009 at 04:22:18PM -0400, Eddie Drapkin wrote:
On Fri, Sep 4, 2009 at 12:02 PM, Lupus
Michaelismickael+...@lupusmic.org wrote:
if you're on shared hosting (but then again I am of the opinion
that those who choose to run with shared hosting dig their own graves
in more ways
Nisse Engström wrote:
It may be the browser that is converting those line breaks.
Ah. That's probably it then. I didn't realize that was a part of the
HTML standard. Thanks!
James
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Fri, Sep 4, 2009 at 2:38 PM, jim white jbw2...@earthlink.net wrote:
It's a web app that draws maps in a browser. Sometime it will generate a
seg fault. The command should not take long, so if there is some script
construct that will throw an exception after a few seconds if the command
has
- Original Message
From: sono...@fannullone.us sono...@fannullone.us
To: PHP General List php-general@lists.php.net
Sent: Friday, September 4, 2009 12:57:08 PM
Subject: [PHP] Include Files in HTML
In my readings, I've run across examples showing include files being
called
- Original Message
From: Tommy Pham tommy...@yahoo.com
To: php-general@lists.php.net
Sent: Friday, September 4, 2009 4:11:31 PM
Subject: Re: [PHP] Include Files in HTML
- Original Message
From: sono...@fannullone.us
To: PHP General List
Sent: Friday, September 4,
On Sep 4, 2009, at 5:03 PM, sono...@fannullone.us wrote:
Depends on what you are including. The only tags that can be
inside the
head are base, link, meta, script, style, and title.
Everything else is either body or prologue.
I meant PHP includes like this one:
?php
Hi,
Thanks I'll look at libevent. I have also been thinking about using an
XHR approach, but wonder how passing PHP references works with javascript.
Jim
Ben Dunlap wrote:
On Fri, Sep 4, 2009 at 2:38 PM, jim white jbw2...@earthlink.net
mailto:jbw2...@earthlink.net wrote:
It's a web
Paul M Foster wrote:
On Fri, Sep 04, 2009 at 04:22:18PM -0400, Eddie Drapkin wrote:
On Fri, Sep 4, 2009 at 12:02 PM, Lupus
Michaelismickael+...@lupusmic.org wrote:
if you're on shared hosting (but then again I am of the opinion
that those who choose to run with shared hosting dig their own
On Fri, 4 Sep 2009 14:58:55 +0200, ralph_def...@yahoo.de (Ralph Deffke) wrote:
Hi all, I'm a bit under stress, maybe somebody knows the regex on a snap.
using PHP_EOL would be great.
Here is a function which works for files pasted from browser screens:
function clean_up($dirty_file)
{
On Fri, Sep 04, 2009 at 08:15:41PM -0400, Robert Cummings wrote:
Paul M Foster wrote:
On Fri, Sep 04, 2009 at 04:22:18PM -0400, Eddie Drapkin wrote:
On Fri, Sep 4, 2009 at 12:02 PM, Lupus
Michaelismickael+...@lupusmic.org wrote:
if you're on shared hosting (but then again I am of the
- Original Message
From: Paul M Foster pa...@quillandmouse.com
To: php-general@lists.php.net
Sent: Friday, September 4, 2009 9:15:08 PM
Subject: Re: [PHP] Searching on AlphaNumeric Content Only
On Fri, Sep 04, 2009 at 08:15:41PM -0400, Robert Cummings wrote:
Paul M Foster
61 matches
Mail list logo