Maybe I'm just blind, but I can't find any way to count an array size in
bytes? I have a quite big array with multiple data formats in it, and I
would like to know how big it is in bytes...
--
Anders Norrbring
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
hbeaumont hbeaumont wrote:
I have a site with images that I want people to download but not have
the direct path to. ie. I do not want them to be able to just view the
source, find the dir and then download everything or direct link to
them.
Turn off directory indexes or put an index.html
Christopher Taylor wrote:
Stephen Martindale wrote:
I am having great difficulty understanding dates and times with PHP
and MySql.
As far as I understand them, the PHP date and time construct is
timezone and DST aware, but MySql's DATETIME and TIMESTAMP fields are
not. I believe that this
Hello All,
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 never been satisfied with my code just working, I always want to
know
Anders Norrbring wrote:
Maybe I'm just blind, but I can't find any way to count an array size in
bytes? I have a quite big array with multiple data formats in it, and I
would like to know how big it is in bytes...
I don't think a function exists, but i would probably use (for
benchmarking)
Anders Norrbring wrote:
Maybe I'm just blind, but I can't find any way to count an array
size in bytes? I have a quite big array with multiple data formats
in it, and I would like to know how big it is in bytes...
At 01:05 AM 2/8/2006, Barry wrote:
I don't think a function exists, but i
Paul Novitski wrote:
Anders Norrbring wrote:
Maybe I'm just blind, but I can't find any way to count an array size
in bytes? I have a quite big array with multiple data formats in it,
and I would like to know how big it is in bytes...
At 01:05 AM 2/8/2006, Barry wrote:
I don't think a
Hi,
One of our clients is a true Excel wizard and in order to enable his
highly advanced sheets to become available for others as well (editable
and all), I have created a PHP version of his Excel sheets which uses a
MySQL DB for storage.
I shall spare you all the technical intricacies of
phplists wrote:
Hi,
I'm still trying to get to grips with REGEX and have hit a hurdle with
the following:
I have this bit of text:
(\(EX\) RV-6 )
I want to remove the '\(EX\)' part of it
so leaving just: ( RV-6 )
$text = '(\(EX\) RV-6 )';
$bits = explode(' ',$text);
$leaving = '(
I have this bit of text:
(\(EX\) RV-6 )
I want to remove the '\(EX\)' part of it
so leaving just: ( RV-6 )
$text = '(\(EX\) RV-6 )';
$str = str_replace('\(EX\)','',$text);
As Burhan put it, regex is not always the solution to your problem -
in most cases, using regex for this kind of
[snip]
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 never been satisfied with my code just working, I always want to
know whether the
Hi,
I am looking for a cart that allows me to do the following
-Add new items with image
-deleted items
-indicate when an item is sold put
- is integratable with paypal
R.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
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
Hi all,
I've written a ArrayToExcel(XML) class, you're welcome to use if you
wish. May need a bit of tweaking to get the colspan working (I haven't
touched it in quite a while). But the process itself I think is rather
nice :)
http://projects.londonis.co.uk/arraytoexcel/
Thanks for your
Does anyone know of a way to achieve this nicely, preferrably
creating a tab per table?
Thanks in advance, and cheers,
Olaf
Olaf:
I don't know if this will solve your problem, but if you like it, you
are welcome to the solution.
Please note, the first time into the page, you'll have
The example given outputs to two tabs, sheeta and sheetb
Quoting Olaf Greve [EMAIL PROTECTED]:
Hi all,
I've written a ArrayToExcel(XML) class, you're welcome to use if you
wish. May need a bit of tweaking to get the colspan working (I
haven't touched it in quite a while). But the process
Zen Cart
http://www.zen-cart.co.uk/
Open source and very well supported... lots of user contributions too
Dan
-Original Message-
From: Ross [mailto:[EMAIL PROTECTED]
Sent: 08 February 2006 13:08
To: php-general@lists.php.net
Subject: [PHP] suggest a cart...
Hi,
I am looking for a
Olaf Greve wrote:
I would still be very interested in a way to get the 3 tables sent to
different tabs though, but I'm not certain the way I do it can take care
of that.
Last time I needed (3 years ago) to output something to MS Excel format, I
used Excel Writer
Thanks for that...and yes that would do very nicely.
Unfortunately, for what I'm trying to do, it is of little use. I
probably should have mentioned that the bit of text I used is actually
just part of a much bigger bit of text so exploding on a space would
cause havoc with the rest of it.
Maybe I'm just blind, but I can't find any way to count an array
size in bytes? I have a quite big array with multiple data formats
in it, and I would like to know how big it is in bytes...
--
Anders Norrbring
Yeah, I know -- sizeof is simply count, which doesn't solve the problem.
You
hai,
this is my sample code:
i am having user table with SponsorID as one field in
mysql database,this is my query;
for($j=0;$j5;$j++):
$result=mysql_query(select * from user where SponsorID='$id[$j]' );
endfor;
in above code when i
Hi,
I am trying to replace the images in a page with this code
?
$im = imagecreatetruecolor(400, 30);
$ross = imagecolorallocate($im, 203, 116, 0);
$font = 'simran__.ttf';
$text = 'chicken pakora';
imagettftext($im, 20, 0, 10, 20, $ross, $font,
On 8 Feb 2006, at 14:46, suresh kumar wrote:
this is my sample code:
i am having user table with SponsorID as
one field in mysql database,this is my query;
for($j=0;$j5;$j++):
$result=mysql_query(select * from user where SponsorID='$id
[$j]' );
On 8 Feb 2006, at 14:20, Ross wrote:
I am trying to replace the images in a page with this code
?
$im = imagecreatetruecolor(400, 30);
$ross = imagecolorallocate($im, 203, 116, 0);
$font = 'simran__.ttf';
$text = 'chicken pakora';
suresh kumar wrote:
hai,
this is my sample code:
i am having user table with SponsorID as one field in
mysql database,this is my query;
for($j=0;$j5;$j++):
$result=mysql_query(select * from user where SponsorID='$id[$j]' );
endfor;
[snip]
for($j=0;$j5;$j++):
$result=mysql_query(select * from user where SponsorID='$id[$j]'
);
endfor;
in above code when i print mysql_num_rows($result) inside for loop
its output is 5.when i print outside the for loop its o/p is 0.I searched
weberdev.com website and
Hi
PROBLEM:
I want to let certain users use certain funcions on my page. To manage
that I start a session and define $_SESSION[user_level] to a value from
a mySQL table. So far so good. Users with $_SESSION[user_level]==1 can
access things on the .php page they are on. I made a simple
Fredrik Tillman wrote:
Hi
PROBLEM:
I want to let certain users use certain funcions on my page. To manage
that I start a session and define $_SESSION[user_level] to a value from
a mySQL table. So far so good. Users with $_SESSION[user_level]==1 can
access things on the .php page they are
(I hope this message works... mail server has been playing up)
Zen Cart
http://www.zen-cart.com
Open source, great support and user contribs
HTH
Dan
-Original Message-
From: Ross [mailto:[EMAIL PROTECTED]
Sent: 08 February 2006 13:08
To: php-general@lists.php.net
Subject: [PHP]
At 10:46 AM 2/8/2006, suresh kumar wrote:
hai,
this is my sample code:
i am having user table with SponsorID as one
field in mysql database,this is my query;
for($j=0;$j5;$j++):
$result=mysql_query(select * from user where SponsorID='$id[$j]' );
I'm still in trouble with this problem :(
Solution:
$query = my_query(
SELECT p.prod_id, p.prod_name, p.prod_no, chp.cat_id, c.cat_name,
c.cat_parent, pr.price
FROM products as p
LEFT JOIN categories_has_products as chp ON chp.prod_id = p.prod_id
LEFT JOIN categories as c ON
ok.. Let me explain the problem better.
'user_level' is set by a login script. It seems to be working fine since
I can make things like:
if (1==$_SESSION[user_level]) { let this stuff happen }
on my mainpage.
on that same mainpage I use
include (page.php);
(I also tried require...)
If I
Fredrik Tillman wrote:
ok.. Let me explain the problem better.
'user_level' is set by a login script. It seems to be working fine since
I can make things like:
if (1==$_SESSION[user_level]) { let this stuff happen }
on my mainpage.
on that same mainpage I use
include (page.php);
(I also
Fredrik Tillman wrote:
ok.. Let me explain the problem better.
'user_level' is set by a login script. It seems to be working fine since
I can make things like:
if (1==$_SESSION[user_level]) { let this stuff happen }
$_SESSION[user_level] is wrong unless 'user_level' is a defined constant
I'm contemplating using Smarty Templates for a website and was wondering
what opinions on them, pro or con, may be.
Thanks in advance for all your help.
-Roy
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ok.. I was a little too fast again when explaining my problem.. Gonna
put some code up for you to see...
First of all I DO use quotes. I tried both single and double ones (',)
Ok here are some code:
IN LOGINSCRIPT:
?
/* Check User Script */
session_start(); // Start Session
include
Hello all from a newbie. We have a Nitix server (from Net Integration
Technologies, Inc.) that hosts various web site. Recently they released a
software upgrade, and in the release notes was this warning:
A number of PHP options (in the php.ini file) were changed, either to
improve security or
starting a new topic by replying to an existing thread is
bad form - we know how much work it is to click on the 'new mail'
button and fill in an address but please make the effort (it's in your
interest as well!).
with regard to Smarty why not try searching for existing writing on the subject?
On Wednesday 08 February 2006 16:16, [EMAIL PROTECTED] wrote:
What displays??? Just ttt of course. What exactly could have changed to
make this simple script fail?
register_globals probably
http://uk.php.net/register_globals
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe,
[snip]
What displays??? Just ttt of course. What exactly could have changed to
make this simple script fail?
[/snip]
register_globals in the php.ini has been set to 'off'
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Fredrik Tillman wrote:
IN PAGE.PHP
?php
session_start();
include data.php;
if (empty($_SESSION['user_level'])) { echo (Session is empty);}
?
[More code here]
Hit me if i am wrong, but doesn't it start a new session here?
Would you mind removing the session_start() from that file and test it
your problem is probably the fact that when you include
page.php you are in effect calling session_start() twice -
no idea what that does to your session but I wouldn't be
suprised if that borked the _SESSION array.
TIP: create a 'global include file' that contains all the code
required by every
PROBLEM SOLVED!
What I actually was including was a variable ($main) and since some my
pages are called on from different pages in different folders what I
actually did was seting $main to the full URL to the site
(http://mysite.com/page.php) to avoid confusion. But when calling on a
URL I
On 2/8/06, Fredrik Tillman [EMAIL PROTECTED] wrote:
Ok here are some code:
?
/* Check User Script */
session_start(); // Start Session
include 'db.php';
// Convert to simple variables
$username = $_POST['username'];
$password = $_POST['password'];
if((!$username) || (!$password)){
Hello,
For debugging purposes, I have display_errors = On in the /etc/php.ini on my
development server.
I'm trying to use the error_log() function to log errors, however, the string
message does not get send to script output (ie. browser), even with
display_errors = on. I can only see the
At 01:05 AM 2/8/2006, Barry wrote:
I don't think a function exists, but i would probably use (for
benchmarking) a recursive foreach in combination with strlen.
And add it all up.
(This is probably some work for the PC so that's why benchmarking)
It would be interesting to know whether that
If you're using a Redhat Enterprise version with a support contract then I
personally don't think you should attempt to run a non-redhat php binary.
Instead find out how redhat make their php-mysql or php-ldap or
php-{some_other_php_module} rpm, Make an RPM, and install it like you would
any
Hello
Is target=_parent opposite to target=_blank?
Thanks
-Will
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[snip]
Is target=_parent opposite to target=_blank?
[/snip]
Opposite? no. Not alike? yes.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi Murray,
The length of text is quite long..it is in fact a 150+ page PDF file,
which as it's using an earlier version of PDF I can 'translate' into a
format that I can extract data from..it's just this one bit of text that
I'm stuck on. Yes it does appear multiple times, but the pattern is
Alexis,
Unfortunately, for what I'm trying to do, it is of little use. I
probably should have mentioned that the bit of text I used is actually
just part of a much bigger bit of text so exploding on a space would
cause havoc with the rest of it. Hence the REGEX question.
$text =
I have this bit of text:
(\(EX\) RV-6 )
I want to remove the '\(EX\)' part of it
so leaving just: ( RV-6 )
$text = '(\(EX\) RV-6 )';
$str = str_replace('\(EX\)','',$text);
As Burhan put it, regex is not always the solution to your problem -
in most cases, using regex for this kind
I mean.
If I open popup named page2.htm from page1.htm with target=_blank can I go
back to page1.htm with target=_parent?
-W
Jay Blanchard [EMAIL PROTECTED] kirjoitti
viestissä:[EMAIL PROTECTED]
[snip]
Is target=_parent opposite to target=_blank?
[/snip]
Opposite? no. Not alike? yes.
Rory Browne skrev:
At 01:05 AM 2/8/2006, Barry wrote:
I don't think a function exists, but i would probably use (for
benchmarking) a recursive foreach in combination with strlen.
And add it all up.
(This is probably some work for the PC so that's why benchmarking)
It would be interesting to
Yes, we are using RHE 4 with a support contract. I need to get db2 support
compiled in so we can access our AS400 using ODBC. _
From: Rory Browne [mailto:[EMAIL PROTECTED]
To: Marcus Bointon [mailto:[EMAIL PROTECTED]
Cc: Justin Cook [mailto:[EMAIL PROTECTED], PHP General [mailto:[EMAIL
you can use php-odbc make sure you have unixODBC or like install on
the system, once you do that its a piece of cake, been doing that here
for a few months.
On 2/8/06, Justin Cook [EMAIL PROTECTED] wrote:
Yes, we are using RHE 4 with a support contract. I need to get db2 support
compiled in so
What you need to do is close page2.htm with JavaScript (window.close)
And then page1.htm will be back. To make sure page1 will be back
You can reload it with onload=focus() in the BODY.
Sincerely
berber
Visit the Weber Sites Today,
To see where PHP might take you tomorrow.
PHP code
Great, I'll do it that way. That sounds easier than what I was attempting to
do. Thanks!
_
From: Dan McCullough [mailto:[EMAIL PROTECTED]
To: php-general@lists.php.net
Sent: Wed, 08 Feb 2006 13:23:17 -0600
Subject: Re: [PHP] Recompile PHP on pre-installed system
you can use php-odbc
Let's say you did some change on your popup window (page2.php)
if(isset($_POST['change']))
{
# your changes code here
# and, once you are finished you are going to execute the folloving html
code
?
html
head
script language=JavaScript!--
On Wed, Feb 08, 2006 at 01:25:18PM -0500, Reuben D. Budiardja wrote:
Hello,
For debugging purposes, I have display_errors = On in the /etc/php.ini on
my
development server.
I'm trying to use the error_log() function to log errors, however, the string
message does not get send to
On Wed, Feb 08, 2006 at 09:02:10PM +0200, William Stokes wrote:
Hello
Is target=_parent opposite to target=_blank?
http://www.w3.org/TR/html4/types.html#type-frame-target
Curt.
--
cat .signature: No such file or directory
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe,
Hi,
Grab that query and run it through mysql with 'explain', so:
explain SELECT p.prod_id, p.prod_name, p.prod_no, chp.cat_id,
c.cat_name, c.cat_parent, pr.price
FROM products as p
LEFT JOIN categories_has_products as chp ON chp.prod_id = p.prod_id
LEFT JOIN categories as c ON chp.cat_id =
hbeaumont hbeaumont wrote:
Hi,
I have a site with images that I want people to download but not have
the direct path to. ie. I do not want them to be able to just view the
source, find the dir and then download everything or direct link to
them.
However I can see no way to do this other than
Oli,
Looks interesting enough to play with. The page mentions look at the
code yet I cannot find the code. Is it available?
Gerry
On 2/8/06, Oli Howson [EMAIL PROTECTED] wrote:
The example given outputs to two tabs, sheeta and sheetb
Quoting Olaf Greve [EMAIL PROTECTED]:
Hi all,
I've
You should use $_POST...
On 2/8/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Hello all from a newbie. We have a Nitix server (from Net Integration
Technologies, Inc.) that hosts various web site. Recently they released a
software upgrade, and in the release notes was this warning:
A
Hm. Have no idea what does it means:
table
type
possible_keys
key
key_len
ref
rows
Extra
p
ALL
NULL
NULL
NULL
NULL
1268
Using
where;
Using
temporary; Using filesort
chp
index
NULL
PRIMARY
8
NULL
1741
Using
index
c
eq_ref
PRIMARY
PRIMARY
4
The result display is bad (at least on at email). Here is a snapshot:
http://afan.net/bhw/snapshot1.png
-afan
On Wed, 2006-02-08 at 19:39 -0500, Afan Pasalic wrote:
Hm. Have no idea what does it means:
table
type
possible_keys
key
key_len
ref
rows
Extra
p
ALL
Can you post it how it comes back or copy/paste it to a webpage (.txt is
fine) so we can see it formatted?
Afan Pasalic wrote:
Hm. Have no idea what does it means:
table
type
possible_keys
key
key_len
ref
rows
Extra
p
ALL
NULL
NULL
NULL
NULL
1268
Using
where;
Oops, missed this one before I sent that other email.
I think it's the order of your joins playing up.
LEFT JOIN categories as c ON chp.cat_id = c.cat_id
LEFT JOIN prices as pr ON pr.prod_id = p.prod_id
That means it will join categories - prices - not what you want.
Try this query:
On Wed, Feb 08, 2006 at 08:02:41PM -0500, Afan Pasalic wrote:
The result display is bad (at least on at email). Here is a snapshot:
http://afan.net/bhw/snapshot1.png
That isn't good. I would suggest you seek help on a sql list like
mysql's general list
Curt.
--
cat .signature: No such file
Hi,
Joins are fine to use, the problem here is you have them in the wrong order.
SELECT p.prod_id, p.prod_name, p.prod_no, chp.cat_id,
c.cat_name, c.cat_parent, pr.price
FROM products as p
LEFT JOIN categories_has_products as chp ON chp.prod_id = p.prod_id
LEFT JOIN categories as c ON
Hello Everyone,
I have a config.inc.php file which basically contains all the
configuration info that the applications needs (directory/file
locations, database credentials, etc). The information there is set
using the define() function.
However, I've seen some open-source projects which either
Hi Matt,
I use define's.
With variables it's easy to forget to global'ise it when you go into a
function, define's don't have this issue.
Matt Arnilo S. Baluyos (Mailing Lists) wrote:
Hello Everyone,
I have a config.inc.php file which basically contains all the
configuration info that the
2006/2/4, Richard Lynch [EMAIL PROTECTED]:
Put the path of the file you want in the URL?
Sorry, what do you mean by this?
And make *SURE* you do not let that turn into things like:
/etc/passwd
I have control to that in my code to prevent this from happening ^^
More info here:
74 matches
Mail list logo