Hey all,
I've got a project where I'm taking form information from the
user and writing records to several tables in a MySQL database.
The problem I'm having is I need to write a unique number for
the ID column of the records. Auto increment won't work
because I could have
Hi,
ReflectionClass
getConstant
getConstants
hasConstant
http://www.ren.dotgeek.org/classbrowser/class.php?class=ReflectionClass
Jared
-Original Message-
From: Arnaldo Gandol [mailto:[EMAIL PROTECTED]
Sent: 07 March 2006 21:03
To: php-general@lists.php.net
Subject: [PHP] class
On Sat, Mar 04, 2006 at 07:01:55PM -0700, Paul Goepfert wrote:
Hi all,
ls there anyway I can set the date to the timezone of the clients
timezone? For example, if a person opens the web page at 3/6 12:01
EST and another person opens the same page at 3/5 10:01 MST I would
like
Hi,
Only way I know is to import them into the global scope with define()
If (!defined(PDO_FETCH_ASSOC))
define('PDO_FETCH_ASSOC', PDO::FETCH_ASSOC);
As for further differences, I'm not aware of any.
Jared
According to documentation, PDO globals constants in 5.0.3+
were changed to
There are variants of base64, which replace the + / characters with something
less likely to cause problems.
http://en.wikipedia.org/wiki/Base64
Jared
sorry Ive done it again, for anyones interest, you might have
to urlencode the string twice for mod_rewrite to accept
encrypted and
Why are you passing the POST array? As it's superglobal why
not just work directly on it within the function?
Passing it has distinct advantages, like being able to test the function.
Jared
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
Subject: Re: [PHP] encrypted urls, mcrypt and mod_rewrite
Somehow this part of the string is a problem, it has
underscores, but there is probably other things in this.
_%E5%D4%13%82%C9%DFN%5EFs%5E47%B2v%2F%D7%A4%0C%C6%9EnJ
I'd base64 encode that first then urlencode :)
On
Hi,
As your using MySQL5, I'd recommend putting all the Nested Set code in
stored procedures, that way the client doesn't need
to know about anything about the method, and the left, right columns never need
to be retrieved.
Jared
I've been searching the web for the past few hours
Hi,
Short version, is there any way of listing all open resources from
within a PHP script? Think I may have a problem relating
to the object/resource shutdown order within PHP, but cant see which custom
stream handler still has an open resource.
Long version...
-Original Message-
From: Jochem Maas [mailto:[EMAIL PROTECTED]
Sent: 10 February 2006 14:17
To: [EMAIL PROTECTED]
Cc: php-general@lists.php.net
Subject: Re: [PHP] Debugging custom streams
Jared Williams wrote:
Hi,
Short version, is there any way of listing all open
-Original Message-
From: Jochem Maas [mailto:[EMAIL PROTECTED]
Sent: 10 February 2006 14:17
To: [EMAIL PROTECTED]
Cc: php-general@lists.php.net
Subject: Re: [PHP] Debugging custom streams
Jared Williams wrote:
Hi,
Short version, is there any way of listing all open
Ahha, after some rethinking, I've dropped the append custom stream, as its not
really required.
And instead of using a custom in memory stream for handling the central
directory stream, just using tmpfile(), the application
error has disappeared.
Jared
Jared Williams wrote:
Hi
WILD GUESS!!!
Since you're NOT closing off the streams, PHP is trying to
close them for you, but you've unset various variables and
whatnot, and confused PHP into fclose()ing the WRONG thing.
Hmm, I said all streams are getting closed.
If they were not then a malformed zip would be
Sitepoints' PAD
http://www.sitepoint.com/forums/forumdisplay.php?f=147
Jared
What would be the definitive PHP chat community to join for
someone who likes to discuss how things *should* be done, or
would be done
*properly* as opposed to the ol' How do I ...-style discussions?
I've
I have an HTML document at home (the Firefox bookmarks
output) that I was trying to parse this morning, with many
links as such:
a href=http://www.aximsite.com/articles/link.php?id=22;
add_date=1130275531 last_charset=windows-1252
id=rdf:#$FOQotKnowledge Base: What Can I Do With My
Anyone have any opinions or suggestions on cheap/free load
testing tools for dynamic sites?
Microsoft WAST
http://www.microsoft.com/technet/archive/itsolutions/intranet/downloads/webstres.mspx
Jared
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
Take a look at
http://www.big-boards.com/
Jared
Hi,
Im looking for a good forum thats supports high load. (Now
between 300-2.000 active sessions, much more in next 2 years)
I have heard about vBulletin and PhpBB. At the moment I think
vBulletin is the best choice, because I know
Hi,
Just unset the ones you've picked
?php
#random images example
#this is your file
$file = images.txt;
#open the file
$openFile = file($file);
#generate a random number
srand((double)microtime()*100);
#get one of the entries in the file
for ($i = 0; $i 10; ++$i)
{
$r =
Hi,
Im using XmlReader to pass through XML which has a doctype, now the
problem is I cannot see how to retrieve the publicId
and/or systemId of the doctype declaration, is this possible or a limitation of
libxml?
!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN
Hi,
Does PHPs XmlReader support Xinclude ? Seems libxml does reading this
post
http://mail.gnome.org/archives/xml/2004-February/msg00190.html , but the
corresponding constant seems missing in PHP
Jared
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
Anyone know to get IE6 to return POST data from a textarea
when the text is pasted in?
Works fine for Mozilla, etc.
print_r($_POST) shows several input... and text ...
values just fine.
If it doesn't have a name attribute, or is disabled IE won't include it in the
post.
Jared
--
-Original Message-
From: Rob Richards [mailto:[EMAIL PROTECTED]
Sent: 07 December 2005 04:21
To: [EMAIL PROTECTED]
Cc: php-general@lists.php.net
Subject: Re: XmlWriter::writeDTD bug...
Jared Williams wrote:
Hi,
$writer = new XmlWriter();
...
$writer
Jared Williams wrote:
Hi,
$writer = new XmlWriter();
...
$writer-writeDtd('html', '-//W3C//DTD XHTML 1.0 Strict//EN',
'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd');
produces no whitespace between the public system ids like...
!DOCTYPE
Jared Williams wrote:
PS.
Yeah, thought it was libxml, hence didn't file a pecl
bug report. But
there does seem a problem with this method as can't just have a
publicId or a systemId, libxml function uses NULL as a
parameter to specify which id you don't want to use. Which
Hi,
Why not
for ($i = 0; $i 100/100; ++$i)
{
for ($j = 0; $j 100; ++$j)
{
// do something standard
}
// do something special for this occurence
}
Jared
-Original Message-
From: Steve McGill [mailto:[EMAIL PROTECTED]
Sent: 06 December 2005 10:18
Hi,
$writer = new XmlWriter();
...
$writer-writeDtd('html', '-//W3C//DTD XHTML 1.0 Strict//EN',
'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd');
produces no whitespace between the public system ids like...
!DOCTYPE html PUBLIC -//W3C//DTD
Hi,
Just been looking over some code, and saw
if (strlen($data) !== file_put_contents($filename, $data))
where $data is UTF8, so wondering if this is going to break in PHP6, if
so what should be the equivalent code?
Jared
--
PHP General Mailing
Jared Williams wrote:
Hi,
Just been looking over some code, and saw
if (strlen($data) !== file_put_contents($filename, $data))
where $data is UTF8, so wondering if this is going to
break in PHP6, if so what should be the equivalent code
Hi,
Having trouble writing a RecursiveFilterIterator to exclude linked
directories from the recursive listing..
class DXLinkDirectoryRecursiveFilter extends RecursiveFilterIterator
{
function accept() { return TRUE; }
}
interface DXDirectoryVisitor
{
function
Say I have an ancestry application where the users can enter
parents, children, etc. The children have children, etc.
table people
id
parent_id
what is the best way to pull this from the db minimizing the
number of queries to build a tree view of parents to children?
I have started making use of the APC extension to cache
opcodes, etc now I'm also trying to cache the output of some
sql queries and I want to use a hash of the query as key to
store/fetch the value e.g:
apc_fetch(md5($qry))
does anyone know of a good reason (including performance
The code below lacks the part where the folling DTD attribute is
created: !ATTLIST document id ID #IMPLIED
How can I create the above DTD attribute in the code below?
?php
// Creates an instance of the DOMImplementation class
$oDomImp = new DOMImplementation;
// Creates a
Jared Williams wrote:
There is no real standard for creating DTDs on the fly, and
therefore libxml/DOM doesn't have any methods afaik.
The one method DOMElement::setIDAttribute() should work I
think, but
whilst PHP has the method, doesnt seem todo anything. :/
DocumentType
Thanks Richard that makes it clear.
Thomas
Hello Thomas,
Thursday, June 2, 2005, 10:20:11 AM, you wrote:
T I have a bit of strange question: when wanting to insert multiple
T records into the db, instead of looping through the set
and executing
T mysql_query (which will then
Hello list,
I have an array which holds some objects. Each object
represent elements from an email header in a given mailbox.
Each object has properties like from, sendtime, subject etc.
I want to sort the order of the objects in the array by their
attribute sendtime in order to get
-Original Message-
From: Victor Spång Arthursson [mailto:[EMAIL PROTECTED]
Sent: 27 May 2005 17:25
To: php-general@lists.php.net
Subject: [PHP] DOM: browse childnodes but not recursively
Ciao!
I really hope someone can help me on this, since I have been
putting in to much
Hey,
Can anyone suggest a few places where i can get some decent
tech/programming/php news feeds?
I presently have the PHP.net feed (but its not too good
because the news does not change much in days) and I am using
yahoo's feeds for software, digital music and internet.
I was
Hey,
Can anyone suggest a few places where i can get some decent
tech/programming/php news feeds?
I presently have the PHP.net feed (but its not too good
because the news does not change much in days) and I am using
yahoo's feeds for software, digital music and internet.
I was
I'm trying to use libxml_set_streams_context() to load a
remote xml file via HTTP conditional GET with
DOMDocument::load() by stuffing an
'If-Modified-Since: --- HTTP header into the stream, but no
matter how I try it I always get an HTTP 200 response when I
know the last- modified
-Original Message-
From: Bill Hoffman [mailto:[EMAIL PROTECTED]
Sent: 19 May 2005 00:46
To: php-general@lists.php.net
Subject: Re: [PHP] libxml_set_streams_context
On May 18, 2005, at 4:10 PM, Jared Williams wrote:
Sure the server is checking if modified since headers
Hi,
I've used loadHTML() to read a HTML file to DOM. This file
starts with a string like !DOCTYPE HTML PUBLIC -//W3C//DTD
HTML 4.01 Transitional//EN
Do someone know how I can access this string? By reading the
doctype back from DOMDocument I only found the name (HTML)
but nothing
On Sat, 2005-05-14 at 07:57, Jared Williams wrote:
Hi,
I've used loadHTML() to read a HTML file to DOM. This file starts
with a string like !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01
Transitional//EN
Do someone know how I can access this string? By reading
the doctype
Using libxslt and DOM to load up an xml file and display
within another file via 'include'.. Something is adding in
'?xml version=1.0?' is there a switch or something that
turns this off?
xsl:output omit-xml-declaration=yes / in the xsl stylesheet?
Jared
--
PHP General Mailing List
I guess it is the missing semicolon.
And you can write:
echo trtd? echo $product_type ?/td/tr
as simply
echo trtd$product_type/td/tr
I prefer
echo 'trtd', $product_type, '/td/tr';
No string concatenation, or variable replacement required.
Jared
--
PHP General Mailing List
Hi All,
I need to implement the ability to ftp upload files from
client machines via a form in a web application I'm developing.
From reading the PHP help, all I can find to perform this is
the POST method for handling file uploads
Hi,
Has anyone got the DOM extension to load compressed XML transparently?
libxml2 apparently has this feature, but it appears not present in PHP.
Jared
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi,
Has anyone got the DOM extension to load compressed XML transparently?
libxml2 apparently has this feature, but it appears not present in PHP
build.
Jared
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I realize this is a dumb question but I just can't come up
with an equation that will do this and I don't see an
internal PHP function (for version 4.3) that will do this...
Basically I need to come up with an equation/algorithm that
will round any number up/down to the nearest X.
I
Evert | Rooftop Solutions wrote:
Yes, and that's how I read this reply =)
About the subject,
I'm working on a xml-based templating system, which caches all the
steps it does, so it overcomes the slowness =) And ofcource
because I
like xml and all the neith things you can do
On Mon, April 25, 2005 3:14 pm, Richard Collyer said:
This is probably more of a db question but...
Probably.
I am writing an employee database for work. The majority of it is
simple enough however I am stuck on the timetabling. It has
to be done
in PHP as there are 40 plus
Looks like mysqli is the new method of talking to mysql?
Should I be moving away from the legacy mysql_* functions?
I'm running php5 and mysql 4.1.11 on IIS5 and Apache 2.
Why not use PDO :)
Jared
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
On 4/20/05, Jared Williams [EMAIL PROTECTED] wrote:
Why not use PDO :)
Pacific Decadal Oscillation?
I'm stumped.
PHP Data Objects
http://www.php.net/pdo
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi there!
I guess this is off-topic? but I want to know if this is
possible. (If
there's anyone out there that have a solution, I would appreciate it
though)
I want to know if there is anyway of showing tables in PHP
in an order
like this in a single SQL-statement...
For documents to conform to the XHTML recommendation,
ampersand characters much be encoded as amp;. The
documentation for PHP recognises this. The same applies to
HTML (with some exceptions that the session code will never
encounter), although the PHP documentation makes no mention of
===
Problem: can't retrieve the 1 from the ERRORCODE tag.
I've narrowed down the source to the xmlns attribute inside
the FMPXMLRESULT tag. Still can't figure out how to code it
to grab the 1 though. Any ideas? I've tried:
/ERRORCODE
FMPXMLRESULT/ERRORCODE
On Sun, April 10, 2005 4:32 pm, Marek Kilimajer said:
Assuming your form is named Selection, you will have a javascript
array document.forms['Selection'].elements['distID[]']
available. You
can try:
alert(document.forms['Selection'].elements['distID[]'][0].value);
I can
but i must give them php support or else they coulnot do
anything on the server...
im limiting them by functions , safe mode and more..
I've known atleast one hosting operation that compile their own custom PHP, to
limit the impact of problematic code.
The only thing I can remember that
I'm using Exceptions and variously handling them in
try..catch blocks or defaulting to my set_exception_handler handler.
When I create an Exception I'd like to prepend the class of
the Exception to the message. Can this be done with code or
do I have to hard code the name of the
There has to be a better way. Something more elegant?
key()
http://php.net/key
Jared
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I got a bit frustrated with image upload stuff with different
image name problems. So I created a system that gives the
uploaded imaged a random numeric name between 1-10 000 000
and saves the file to a server folder and the image name to mysql DB.
Is there a so sort of a problem here
JW If want to create a unique filename, and are using PHP4.3.2 or
JW better, use fopen() with the 'x' or 'x+' mode, rather than
JW file_exists().
If you're happy with your scripts generating E_WARNING's all
over the place then yes. Personally, I'm not.
Use @ to surpress them.
You
JW You cannot guarentee the filename you think doesn't exist with the
JW file_exists() doesn't exist when you eventually fopen() it,
JW otherwise.
Using the original posters method, I agree. But there are
plenty of ways around this without forcing a warning to occur
(or having to
Sure, at the base level the issue is simply the uniqueness of
the filename. So there are several options open in this
regard. Either use an md5'd uniqid rand combination (as on
the uniqid manual page) and just go with that, operating
under the assumption that the chances of a
JW I'll take absolutely bullet-proof and handled/supressed warnings,
JW over relatively bullet-proof.
That would be fine if your previous solution was absolutely
bullet-proof, or for that matter provided a solution for the
original problem of renaming uploaded files and keeping them
I need to output a Hex value, e.g.:
686E8AF8
In the following format:
68 6E 8A F8
In other words, separated by spaces. Now I realize there
are a million
ways to do this, but I would like a suggestion on which you
think is
the most efficient? Incidentally, I'm starting
Does anyone have any idea why this is happening and how I can avoid
this double request?
Try checking the UserAgent for each request.
http://support.microsoft.com/default.aspx?scid=kb;en-us;293792
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
...
-Original Message-
From: Ford, Mike [LSS] [mailto:[EMAIL PROTECTED]]
Sent: 17 September 2002 12:43
To: 'Jared Williams'; [EMAIL PROTECTED]
Subject: RE: [PHP] Illegal characters in HTML form element names.
-Original Message-
From: Jared Williams [mailto:[EMAIL PROTECTED]]
Sent: 11
Hi,
The HTML standard defines the set of characters that are valid in form
element names. It does not include [ or ] and yet this seems to be the only
way to get a set of form elements grouped into an array for server side
processing.
Why doesnt PHP do (Perl/ASP) automatically create an
68 matches
Mail list logo