On Wed, 2005-03-16 at 16:50 +1000, Ligaya Turmelle wrote:
assuming you are using PEAR DB -
$result = $db-query(UPDATE items SET (item_name, item_desc,
item_price, extraprice) VALUES (?,?,?,?) WHERE item_id = 3,
array($_POST['title'], $_POST['description'], $_POST['price'],
William Stokes wrote:
Hello,
Again this might be more of a HTML quetion. If so sorry about that.
Anyway I was just trying to make a log out button to a page. It should end a
session or/and close browser window. (Closing browser ends the session as
well I think?
no
)
All variable values are
Hi everyone,
When is the object destroyed which is created in a PHP5 script?
Suppose i say:
?php
$m = new MyClass;
$m-fun1('abcd');
$m-fun2();
?
Then why is the destructor not called when my script ends? Can it be
called explicitly? If yes, how?
Thanking you in advance,
Regards
aj
--
Christian Stadler wrote:
Eli schrieb:
- ($cls instanceof ClassName) *requires* from ClassName to be declared,
and generates a fatal error when ClassName is not declared.
How about
if (class_exists('ClassName') AND $cls instanceof ClassName)
{
...
}
Regards,
Christian Stadler
Nice
Simon Allison wrote:
Hey,
Obviously this has something to do with the quotation marks in the a href
statement, however I am new to php and my attempts using addslashes and
stripslashes have failed. I would be most grateful if anyone could help me.
addslashes() and stripslashes() won't
check www.hotscripts.com
Ryan A wrote:
Hey,
I am looking for a software that just lists adverts...
eg:
Like ebay but without the bidding
Requirements are simple, so simple that i am sure something like this exists
and i dont have to write it myself:
0.They must register first then...
1.offer the
For the basic logout, it's very easy.
Store a session variable which is the last active time. Initialize
it to the current time when the user logs in.
Each time a page loads, start the session and check current time
against the last active time. If the difference is over the limit,
display
-Original Message-
From: Steve Slater [mailto:[EMAIL PROTECTED]
Sent: Saturday, March 12, 2005 5:29 PM
$name_array = explode( ,$name);
$short_name = $name_array[0] . end($name_array);
And a dozen other ways to do it I'm sure. I just finished a
project with a mess of pattern matching
Hi,
I have PHP 5.03 running on SuSE 9.2. Some code working fine in PHP 4.3x
now throws a message:
Notice: serialize() [function.serialize]: __sleep should return an
array only containing the names of instance-variables to serialize. in
ANVphpApp.php on line 840
Anyone knows what is the
-Original Message-
From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 15, 2005 4:05 AM
That's why I'd like to stick with apache2 + php5 default and
apache2+php4 just for a single site hosted (the one that uses imp).
See my previous message describing the ProxyPass
Hello.
Please consider this:
class A {
function A($Cont){
$this-Container= $Cont;
}
function A_1(){
$this-Container-objB-B_1(somehing);
}
}
class B {
function B($Cont){
$this-Container= $Cont;
}
function B_1(){
//anything
}
}
class Container{
I am writing an application to allow users to enter weekly data and am
storing the data based on the year and the ISO week number. The data
will be reported on a monthly basis and therefore I need a way to find
the ISO week number for the first full week of the month
(Monday-Sunday) and the ISO
Hello,
Again this might be more of a HTML quetion. If so sorry about that.
Anyway I was just trying to make a log out button to a page. It should end a
session or/and close browser window. (Closing browser ends the session as
well I think?)
All variable values are deleted when browser is
Sunny mornings to you all!
Does anyone on this NG know off of the top of their heads what the correct
MIME type is for a CSV file?
The closest I have found on my google is the application/msexcel type, but
this spawns Excel when viewing the file, and I do not want this behaviour.
TIA,
The closest I have found on my google is the
application/msexcel type, but this spawns Excel when
viewing the file, and I do not want this behaviour.
Not sure what is happening with the list this morning, but it is eerily
quiet!
Anyway, a little bit of tinkering and I found that the answer
I've got a problem with quote characters and building XPath query
expressions (PHP 5.0.3). What do I need to do to get them to work? I've
tried various encoding functions but cannot figure it out.
Given this expression, if $id contains one or more double quotes, an
error is thrown.
$query =
On Wed, 16 Mar 2005 11:01:29 -, Mikey [EMAIL PROTECTED] wrote:
Sunny mornings to you all!
Does anyone on this NG know off of the top of their heads what the correct
MIME type is for a CSV file?
What I've always used is:
Content-type: application/octet-stream
The closest I have found
M. Sokolewicz wrote:
William Stokes wrote:
Hello,
Again this might be more of a HTML quetion. If so sorry about that.
Anyway I was just trying to make a log out button to a page. It should
end a session or/and close browser window. (Closing browser ends the
session as well I think?
no
Arjun Jain wrote:
Hi everyone,
When is the object destroyed which is created in a PHP5 script?
Suppose i say:
?php
$m = new MyClass;
$m-fun1('abcd');
$m-fun2();
unset($m); // this fires $m-__destruct() if it exists.
?
Then why is the destructor not called when my script ends? Can it be
it is
Hi,
I have a script that inserts data from files uploaded to our server. I need
to make sure that only one instance of this script runs at anyone time, can
anyone tell me how I can do this?
Many thanks
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
[snip]
I have a script that inserts data from files uploaded to our server. I
need
to make sure that only one instance of this script runs at anyone time,
can
anyone tell me how I can do this?
[/snip]
Don't run another instance. ba-dump ching!
Ok, here is a quick and dirty way to do it, have
To understand the *'s just google for c pointer tutorial, you're
likely to find alot of helpful material.
On Tue, 15 Mar 2005 11:37:26 -0500, Jason Barnett
[EMAIL PROTECTED] wrote:
Rasmus Lerdorf wrote:
Jason Barnett wrote:
Jay Blanchard wrote:
...
In the end you are probably much
Andrei Verovski wrote:
...
Notice: serialize() [function.serialize]: __sleep should return an array
only containing the names of instance-variables to serialize. in
ANVphpApp.php on line 840
Anyone knows what is the problem?
Exactly what the notice says ;) basically __sleep is used so that
Josh Whiting wrote:
I've been trying to switch to MySQL-based session storage instead of the
native PHP session storage. In doing so, I've run into a lot of code on
the web that exhibits a serious flaw regarding concurrent requests from
the same client. All the code I've seen has glossed over
On Wed, 2005-03-16 at 11:12, Jay Blanchard wrote:
[snip]
I have a script that inserts data from files uploaded to our server. I
need
to make sure that only one instance of this script runs at anyone time,
can
anyone tell me how I can do this?
[/snip]
Don't run another instance. ba-dump
C Drozdowski wrote:
...
$query = '//book/chapter' . '[EMAIL PROTECTED]:id=' . $id . ']';
First of all check the XPath documentation:
http://www.w3.org/TR/xpath
http://www.w3.org/TR/xpath#path-abbrev
AFAIK your expression above is the way to build this query. Give us a
link to the XML doc if
Files under 2.5 megs will go into the database just fine, any thing over
that will return the page without errors, but will not be injected into the
database. Not even a record is created.
Edited PHP.INI to allow up to 40M of data to be uploaded. Set the script
timeout to be 9000 seconds. Set
[EMAIL PROTECTED] wrote:
Hello.
Please consider this:
class A {
function A($Cont){
you obviously didn't RTFM about php5's new features, migration issues
etc.
why do I say that? well it because you are using a ''
each time you assign an object. thats not how its done in
php5 -
For a nice introduction to extension writing, read this
article:
Part I: Introduction to PHP and Zend
http://zend.com/php/internals/extension-writing1.php
As well as the various README files found within the php
source files:
http://cvs.php.net/php-src/
And let's not forget about
Jay Blanchard [EMAIL PROTECTED] writes:
[snip]
I have a script that inserts data from files uploaded to our server. I
need
to make sure that only one instance of this script runs at anyone time,
can
anyone tell me how I can do this?
[/snip]
Don't run another instance. ba-dump ching!
[snip]
Unluckily, this will not prevent a race condition. The only
file operations that are guaranteed to be atomic are mkdir()
and symlink(). Try to create the directory and see if it
fails. Also remember to rmdir() the lock directory before exiting
How about grabbing the output from
Philip Olson wrote:
For a nice introduction to extension writing, read this
article:
Part I: Introduction to PHP and Zend
http://zend.com/php/internals/extension-writing1.php
Bookmarked for future reference. Looking forward to the next several
parts in this series...
As well as the
Mikey [EMAIL PROTECTED] writes:
How about grabbing the output from `ps -ax` and looping thourhgthe results
to see if your script is being run?
Again the problem is of atomicity. This is a multi step process
- do a ps -aux
- do a grep on the output
- start script processing
What if second
What are the pros and cons of session.use_trans_sid ON and OFF
Just moved our site from one which had the php.ini, session.use_trans_sid=OFF to
one with it ON
Sure looks ugly having the PHPSESSID showing up for visitors.
Thanks
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe,
Ive created an email script that retrieves email addresses from a mysql
database. Currently Im grabbing the email addresses and putting them in the
mail headers Cc: or Bcc: section in comma delimited format. I do have
sendmail on the current server so Im using the mail function to send the
You know... we talked about this several times before. Please search
the archives for the PHP list's answers.
Hint: STFA tutorial class object
--
Teach a man to fish...
NEW? | http://www.catb.org/~esr/faqs/smart-questions.html
STFA | http://marc.theaimsgroup.com/?l=php-generalw=2
STFM |
Patric Stout wrote:
Currently I am trying to get embed PHP to work. A nice C-application
that can handle PHP-scripts. I hope this is the right place to ask
question about it...
This is a fine place to start. Note: I personally don't really know the
answer to this question, but perhaps I can
Got it - never mind
instead of
$new_array = array($line_split[0] = $line_split[1] );
it's
$new_array = array($line_split[0] , $line_split[1] );
But I'm still not sure how it works so well...
Ok I got this to work but I'm not sure how -- and am having trouble
Greets,
I've gone through the PHP Manual a few times now, reading about classes,
but really, what's written there doesn't make a whole lot of sense to
me. I know a lot, if not the vast majority, of PHP programmers use
classes, so I was wondering if some of you could explain them to me.
What
Ok I got this to work but I'm not sure how -- and am having trouble
re-producing the data:
My script I have so far is:
$lines = file('test2.csv');
foreach ($lines as $line) {
$line_split = explode(,, $line);
if(!(empty($line_split[0]) ) ){
//echo I'm not empty;
It's just a coincidence that I used xml:id as part of my query
expression. If I use following code method to build my expression:
$query = '//book/chapter[section=' . $section . ']';
or say
$query = '//book/[EMAIL PROTECTED]' . $title . ']';
I get an Invalid Predicate... error when either the
Al wrote:
What are the pros and cons of session.use_trans_sid ON and OFF
Just moved our site from one which had the php.ini,
session.use_trans_sid=OFF to one with it ON
Sure looks ugly having the PHPSESSID showing up for visitors.
Thanks
PRO:
- makes life easier when session cookie isn't
Currently I am trying to get embed PHP to work. A nice C-application
that can handle PHP-scripts. I hope this is the right place to ask
question about it...
First of all, there is very poor documentation about this subject on the
web. Even the Zend-docs are outdated. This doesn't make it
Kim Madsen wrote:
-Original Message-
From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 15, 2005 4:05 AM
That's why I'd like to stick with apache2 + php5 default and
apache2+php4 just for a single site hosted (the one that uses imp).
See my previous message describing
Todd Trent mailto:[EMAIL PROTECTED]
on Wednesday, March 16, 2005 12:46 PM said:
- Opt-in list could be less than 100 or in the 1000's.
[snip]
I've been googling all day and have found mailing classes, libraries,
and scripts none of which seem to be documented very well or let me
build
On Wed, Mar 16, 2005 at 06:59:43PM +0100, Marek Kilimajer wrote:
SO, does anyone have some code that uses MySQL to replace PHP's native
session storage that also correctly handles this concurrency problem?
Ideally I'd like to see just a set of functions that can be used with
On Mar 15, 2005, at 11:24 AM, Richard Lynch wrote:
BAD (probably):
Select blablabla FROM t1,t2,t3
WHERE customers LIKE '%$s%'
OR name LIKE '%$s%'
OR domain LIKE '%$s%'
OR email LIKE '%$s%'
OR log LIKE '%$s%'
AND t1.id = t2.t1_id
AND t1.id = t3.t1_id
GOOD (usually):
Select blablabla FROM t1,t2,t3
Todd Trent wrote:
This works fine for a few test emails. What I would like to know is
what is
considered best practice considering the following things:
- This could be hosted on shared hosting server.
- Opt-in list could be less than 100 or in the 1000s.
- May need a way to track sending
Does anyone know of a PHP source code formatter to clean up sloppy code
that runs on OS X?
d
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Try this:
http://www.free-itebooks.com/php-mysql-free-itebooks/
and maybe you'll find ebook you're looking for
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hello,
My news table has a year field as such
Year
2000
2000
2001
2001
2003
2005
2005
I was wondering if you could select from this table so you only get one of
each year, so the output would be
2000
2001
2003
2005
Is this possible, I was trying to think of
Simon Allison wrote:
Hello,
My news table has a year field as such
Year
2000
2000
2001
2001
2003
2005
2005
I was wondering if you could select from this table so you only get one of
each year, so the output would be
2000
2001
Hello,
I am getting this strange error while developing imap mail to mysql
inporting script :
PHP Notice: (null)(): Permission denied (errflg=2) in Unknown on line 0
I am getting it at the end of the script execution without affecting any
actual script functionality.
I am using PHP 4.3.10
I'm running FreeBSD 5.2.1, and last night I cvsupped to the latest
ports.
This afternoon, I proceeded to upgrade PHP from 5.0.1 to 5.0.3.
But I kept getting these errors when restarting apache that it could not
find various shared libraries in /usr/local/lib/php/20041030
I see that I'm supposed to
when I define a number as
$number = 2.00
then echo it the number shows as 2. How can I get the two zeros to show?
This is not in any of my books but a fairly easy solution I'll bet!
R.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
What is the life time of a PHP session object (variable)? Which conditional
test can I perform to check if the session object has timed out?
Jacques
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
In your php.ini, session.gc_maxlifetime=1440;
Best regards,
Yang Shiqi
-Original Message-
From: Jacques [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 17, 2005 1:48 PM
To: php-general@lists.php.net
Subject: [PHP] Session time out
What is the life time of a PHP session object
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
when I define a number as
$number = 2.00
then echo it the number shows as 2. How can I get the two
zeros to show?
This is not in any of my books but a fairly easy solution I'll bet!
the function you want is called sprintf (s for
---BeginMessage---
can anyone help me to write from db to xml using php.
if there is any site please do refer me.
thanks,
karthik
---End Message---
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
can anyone help me to write from db to xml using php.
if there is any site please do refer me.
thanks,
karthik
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 17, 2005 1:21 AM
when I define a number as
$number = 2.00
then echo it the number shows as 2. How can I get the two zeros to
show?
Are You _sure_ the var is declared as a float? Have a look
-Original Message-
From: Phil Neeb [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 16, 2005 8:58 PM
I've gone through the PHP Manual a few times now, reading about classes,
but really, what's written there doesn't make a whole lot of sense to
me. I know a lot, if not the vast
62 matches
Mail list logo