Hi Andrew,
Friday, October 28, 2005, 7:41:21 AM, you wrote:
> How can I query for PHP version?
phpversion() !
Cheers,
Rich
--
Zend Certified Engineer
http://www.launchcode.co.uk
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Dragan Stanojevic - Nevidljivi wrote:
Jasper Bryant-Greene wrote:
On Fri, 2005-10-28 at 01:02 +0200, Dragan Stanojevic - Nevidljivi wrote:
[snip]
and it works fine, I cannot define a constant by expression, like:
class Foo {
const AAA = 1 << 0;
const BBB = 1 << 1;
const CCC = 1 <
Jasper Bryant-Greene wrote:
On Fri, 2005-10-28 at 01:02 +0200, Dragan Stanojevic - Nevidljivi wrote:
[snip]
and it works fine, I cannot define a constant by expression, like:
class Foo {
const AAA = 1 << 0;
const BBB = 1 << 1;
const CCC = 1 << 2;
const DDD = 1 << 3;
}
Well now,
On Fri, 2005-10-28 at 01:02 +0200, Dragan Stanojevic - Nevidljivi wrote:
[snip]
> and it works fine, I cannot define a constant by expression, like:
>
> class Foo {
> const AAA = 1 << 0;
> const BBB = 1 << 1;
> const CCC = 1 << 2;
> const DDD =1 << 3;
> }
>
> Well now, is this a b
Hi,
Thursday, October 27, 2005, 3:15:30 AM, you wrote:
JG> I am having a problem with a couple of function I have written to check
JG> for a type of string, attempt to fix it and pass it back to the main
JG> function. Any help is appreciated.
I would do it with a small class like this:
is_valid
I ran into a similar problem and came up with a slightly different
solution...
As an alternative to passing the file directly through PHP, if you
are running apache, you could DENY access to all files in a directory
and then use PHP to dynamically update a local .htaccess file with
valid
Why should this be "unsafe" (whatever the heck that means) in any way? Of
course you can do it.
Regards,
Niels.
[sorry for mailing to your private address. wrong button :)]
> Anyway, can you do *this* safely as a DOCUMENTED FEATURE:
>
> foreach($array as $k => $v){
> if (...) unset($array[$k]
Hi guys,
I think I've found a bug. I have a bunch of constants, and I'd like to
present them as flags. While I can do
class Foo {
const AAA = 1;
const BBB = 2;
const CCC = 4;
const DDD = 8;
}
and it works fine, I cannot define a constant by expression, like:
class Foo {
const
I am having problems decompressing a zlib'd string located in a file.
In the file headers, the compression says that it is zlib.
But, when I 'gzinflate' the string, I get the error: gzinflate():
data error in
Is the below NOT a zlib or some strange variant ?
anyone know ?
g
$hex="C0636D766
Somewhere in the manual (damned if I can find it now) it says (or used
to say) that you can or can't safely do this:
while (list($k, $v) = each($array)){
if (...) unset($array[$k]);
}
I don't even remember if it's safe or not, but I swear I saw it not
that long ago...
Anyway, can you do *this*
Ben wrote:
> Dan Trainor said the following on 10/27/2005 01:34 PM:
>
>> Ben wrote:
>>
>>> Move the files outside the document root so that they aren't available
>>> via a direct URL, then create a 'file access page' in php that will
>>> check for the session variable and either send or not send t
The best solution is not to change your host at all but to change your
local version of PHP to 4,
PHP4 DOM - http://php.net/manual/en/ref.domxml.php
PHP5 DOM - http://php.net/manual/en/ref.dom.php
The PHP5 and PHP4 extensions are not compatible with each other.
~James
Andrew Kachalo w
And what DOM library, which is compatible with PHP 5.0 and PHP 4.4 can
I use to avoid the conflict I currently have?
On жовт 27, 2005, at 23:32, Alessandro Rossini wrote:
Please guide me what can I do to make my code work without changing
it?
DOM implementation in PHP5 is completely new, and
Dan Trainor said the following on 10/27/2005 01:34 PM:
Ben wrote:
Move the files outside the document root so that they aren't available
via a direct URL, then create a 'file access page' in php that will
check for the session variable and either send or not send the file
based on whether the us
Ben wrote:
> Dan Trainor said the following on 10/27/2005 10:39 AM:
>
>> Jason Motes wrote:
>
>
However, how do people protect against the downloading of real files,
ones which are not parsed by PHP? .WMV, .MOV, .ZIP, .EXE and so on? I
want to protect access to these as well, an
> Please guide me what can I do to make my code work without changing it?
DOM implementation in PHP5 is completely new, and you can't have the same in
PHP4. I think that the most reasonable solution will be change the hosting to
another with PHP5 support...
Best regards.
--
Alessandro 'Aronnax
Jason Gerfen wrote:
I am having a problem with a couple of function I have written to check
for a type of string, attempt to fix it and pass it back to the main
function. Any help is appreciated.
if( ( eregi(
"^[0-9A-Fa-f]{2}\:[0-9A-Fa-f]{2}\:[0-9A-Fa-f]{2}\:[0-9A-Fa-f]{2}\:[0-9A-Fa-f]{2}\:[
Ken Tozier wrote:
I'm having a major problem with what seems, on it's face, to be a
really basic array function.
What happens is on the browser end, I've written some javascript code
that packages up javascript variables in native PHP format and sends
the packed variables to a PHP script o
Not sure about the numbers but soundex could be useful
http://php.net/soundex
James
Chris W. Parker wrote:
Hello,
On my site right now if someone searches for "511" (a misspelling of the
manufacturer 5.11) they are not presented with the right products
because 511 is not found anywhere in
Hello,
On my site right now if someone searches for "511" (a misspelling of the
manufacturer 5.11) they are not presented with the right products
because 511 is not found anywhere in the database.
I've got a few ideas on how to solve this but I want to find one that
requires as little administrat
Dan Trainor said the following on 10/27/2005 10:39 AM:
Jason Motes wrote:
However, how do people protect against the downloading of real files,
ones which are not parsed by PHP? .WMV, .MOV, .ZIP, .EXE and so on? I
want to protect access to these as well, and if a visitor just types in
a URL
Jason Motes wrote:
>>
>> I'm designing a controlled access system in PHP, and it's coming along
>> quite well. It's very simple, and just sets a session varibale, such as
>> $_SESSION['authenticated'] = 1, not a whole lot.
>>
>> Now I run a small sniplet of code on the top of each HTML and PHP fil
I'm designing a controlled access system in PHP, and it's coming along
quite well. It's very simple, and just sets a session varibale, such as
$_SESSION['authenticated'] = 1, not a whole lot.
Now I run a small sniplet of code on the top of each HTML and PHP file,
which checks for this variable,
Hello, all -
I'm designing a controlled access system in PHP, and it's coming along
quite well. It's very simple, and just sets a session varibale, such as
$_SESSION['authenticated'] = 1, not a whole lot.
Now I run a small sniplet of code on the top of each HTML and PHP file,
which checks for th
Hello !
ldap_add is expecting an ARRAY OF STRINGS (according to LDAP-specs) as
third parameter.
but your $info["objectclass"] is an array itself... maybe you try to
implode it into one string...
cheers, hope that helps...
bb
>Hello all,
>
>I have a problem with ldap function :/
>
>Here is my ld
Thanks its working
clive
James Lobley wrote:
These are the relevant sections from my code:
include("e:/bin/pclzip.php");
$provpath_dec = 'E:/Prov/Processed_Files/';
$provpath_unzip = 'E:/data/prov/';
$filename = '20051026202333.zip';
$archive = new PclZip($provpath_dec . $filename);
$arch
Hello all,
I have a problem with ldap function :/
Here is my ldap :
-dc=arzur,dc=local
- ou=Annuaire
+ cn=Benjamin DUPUIS
+ cn=Emeric GIRARD
+ cn=Fabrice DEPIL
+ cn=Fabrice GAUSSEN
+ cn=Jérôme LE MANSEC
+ cn=Olivier MAT
Thanks
Im going to give it a try.
clive
James Lobley wrote:
These are the relevant sections from my code:
include("e:/bin/pclzip.php");
$provpath_dec = 'E:/Prov/Processed_Files/';
$provpath_unzip = 'E:/data/prov/';
$filename = '20051026202333.zip';
$archive = new PclZip($provpath_dec . $fil
Zac Smith schrieb:
> http://www.triptrivia.com/step2-debug.php?State=abc
404
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
These are the relevant sections from my code:
include("e:/bin/pclzip.php");
$provpath_dec = 'E:/Prov/Processed_Files/';
$provpath_unzip = 'E:/data/prov/';
$filename = '20051026202333.zip';
$archive = new PclZip($provpath_dec . $filename);
$archive->extract(PCLZIP_OPT_PATH, $provpath_unzip);
As
I'm using VC6++ and the VC2003 Toolkit
I downloaded a dev tree from:
http://ftp.emini.dk/pub/php/win32/dev/php_build/
the compile keeps failing with:
Creating library Release_TS\php5ts.lib and object Release_TS\php5ts.exp
sunfuncs.obj : error LNK2001: unresolved external symbol __ftol2
uuen
Hi,
When someone sends an e-mail using php, exim sets the following 2
headers (along with others of course):
Received:from x.x.x.x (EHLO host.mydomain.com) (x.x.x.x) by
mta151.mail.dcn.yahoo.com with SMTP; Wed, 24 Sep 2005 10:29:04 -0700
Received: from by host.mydomain.com with lo
Thank you very much
I think it will work, because my problem seems to be with "if" operators and
order...
Thanks again
On 10/27/05, Adrian Bruce <[EMAIL PROTECTED]> wrote:
>
> ok, so i assume that customers is a grouping of some sort and that in
> some cases you may come accross a row like "Staf
if your db is built correctly you could use
UNION or JOIN(S) to build the correct query.
otherwise look into DISTINCT(ROW) and/or creating
temporary tables.
formatting the info later is, as adrian illustrated,
up to you.
t.
ps. all the above depends on your mysql server version and
configuration
ok, so i assume that customers is a grouping of some sort and that in
some cases you may come accross a row like "Staff | John | A36 |LA ".
It may not be a perfect way of doinig it but this is what i would
generally try:
while ($row = mysql_fetch_array($resultset, MYSQL_NUM)){
if($ro
Thanks for your help Adrian, but the problem is that I need to show row[0]
once (Customers text are repeated), and below the details of the records
Your solution shows:
Customers | John | A36 | New York
Customers | Jason | B45 | Los Angeles
(...)
And I need
Customers
John | A36 | New York
Jason |
load each row of the resultset into an array $row using
mysql_fetch_array(), each field in the result set row will be held in
the corresponding array element.
while ($row = mysql_fetch_array($resultset, MYSQL_NUM)){
echo"$row[0] | $row[1] | $row[2]";
}
Hope this helps,
Ade
Danny wrote:
Hi All,
I´ve got a connection, to a MySQL db, and get the following
ResultSet(Category | Name | Code | City)
Customers | John | A36 | New York
Customers | Jason | B45 | Los Angeles
Customers | Max | A36 | Paris
Providers | John | A36 | London
Providers | Mark | B67 | Madrid
And I need the report
My system was runig apache 2.0.52+php5.0.2 under Windows Xp without any
problem. Today i've decided to upgrade to 5.0.5 but after unzipping the
files in the C:\php folder where it was installed de .0.2 version Apache
complained about not finding "php5apache2.dll".
The message from the command line
On Thu, 2005-10-27 at 00:00 +0200, Jochem Maas wrote:
> gonna jump on your thread there Jasper, I would
> like to comment on your function and ask you a question:
>
> which is 'better' (for what), preg_*() or ereg[i]*()?
I prefer preg_*(), but I used eregi() because I couldn't be bothered
figurin
Jochem Maas wrote:
Richard Heyes wrote:
Jochem Maas wrote:
> gonna jump on your thread there Jasper, I would
> like to comment on your function and ask you a question:
>
> which is 'better' (for what), preg_*() or ereg[i]*()?
preg_*, for anything. They're faster, and more versatile.
coo
Richard Heyes wrote:
Jochem Maas wrote:
> gonna jump on your thread there Jasper, I would
> like to comment on your function and ask you a question:
>
> which is 'better' (for what), preg_*() or ereg[i]*()?
preg_*, for anything. They're faster, and more versatile.
cool cheers.
I guess you
Jochem Maas wrote:
> gonna jump on your thread there Jasper, I would
> like to comment on your function and ask you a question:
>
> which is 'better' (for what), preg_*() or ereg[i]*()?
preg_*, for anything. They're faster, and more versatile.
--
Richard Heyes
http://www.phpguru.org
--
PHP Gene
Richard Lynch wrote:
On Wed, October 26, 2005 5:44 am, Clive wrote:
does any one have code/examples for unzipping a file thats been
uploaded
to a server. I would prefer a class rather than something that uses
zip.lib as it may not be configured on the server.
$path = "/full/path/to/uploade
Quoting rouvas <[EMAIL PROTECTED]>:
> Simpler(?) approach:
>
> $element5 = current(array_splice(split(',',$csvstring),5,1));
>
> This is fun!
Indeed... and this looks just fine. A great solution. Thanks. :-)
-Søren
>
> -Stathis
>
> On Wednesday 26 October 2005 17:08, Jochem Maas wrote:
> > S
Hi,
I found that class but could not get it to work. Well it seem to work,
as I could view the files information, but the extract() didn't do
anything. I checked the writes for the directory the zip file was in and
it did have wright rights. Maybe you can post a code snippet.
thanks
clive
46 matches
Mail list logo