echo ${$pdag[$n]}; // is also possible in case the [$n] is the index to
pdag. Otherwise use this:
echo ${$pdag}[$n];
- Tularis
PS. This is basicly the same thing as Ernest said, but shorter...
Ernest E Vogelsinger wrote:
At 16:50 23.11.2002, -<[ Rene Brehmer ]>
mited), your script still
goes on... While you can follow the other link.
The ignore_user_aboort(true), makes sure the server continues till the
script finishes. Otherwise it would kill it as soon as you'd press stop
on your browser :)
Hope that helps,
- Tularis
Leif K-Brooks wrote:
I need
Usually,
using mysql to handle your tables is *way* faster than letting php
handle it.
That's what it was made for, speed...!
In your case, you could just do a complex join I think. That would give
all results in one table, and you could just order that on scheduletime,
and voila, you'd have
#x27;t cache it *at all*.
This can be done using (one, or more) of the following headers:
// HTTP 1.1 compliant:
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
// HTTP 1.0 compliant:
header("Pragma: n
also something that is really NOT recommended to do with php.
The other possiblity is to set a cron job to fire up a script which will
send the email.
- Tularis
Randy Johnson wrote:
Here is what i need to do.
I have a form where a user will submit, email address, email text and a time
like 11
time of posting is kept.
When you post the next thing, the script checks if there was a message
posted, by that user in the last X seconds (can be set manually). If so,
it will return a message saying not to repost stuff. Otherwise, it just
continues...
Hope this helps,
- Tularis
XMB Lead Deve
most forums do this
Seraphim wrote:
Anders Thoresson wrote:
I've seen both guest books and user forums "hacked" by users who
enter javascript or other code, and that way redirects vistors to
other sites or do other unwelcome things. What expressions should I
look for and not allow in my forms
NOTE:
this basicly mimics the way register_globals works.
I use this code to fix register_globals aswell as the magic_quotes_gpc:
$global = @array($_SESSION, $_SERVER, $_COOKIE, $_POST, $_GET, $_FILES,
$_ENV);
$global_old = @array($HTTP_SESSION_VARS, $HTTP_SERVER_VARS,
$HTTP_COOKIE_VARS, $HTTP
I was wondering if this would be a memroy leak? or just some
standard notice that I'm taking up too much memory ;)
Anyone?
- Tularis
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
RROR',
2=> 'WARNING',
3 => 'MINOR ERROR',
4=> 'NOTICE'
);
if($which=='all'){
foreach($this->cache as $cache){
$errors = explode('-|-', $cache);
$type=
I was wondering where I could get the rewrite urls for the rewriting of
urls like here on php.net.
- Tularis
P.S. I don't think they're in the phpweb on CVS, I checked that already
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
David Nicholson wrote:
Hello,
This is a reply to an e-mail that you wrote on Sat, 28 Jun 2003 at 13:16,
lines prefixed by '>' were originally written by you.
I have a password protected site. If you go to an inside page before
logging in, it redirects you to the log in page. I would like to grab
does anyone know how to check what Dictionaries for pspell/aspell are
present on the system? since I will need to do that dynamically ;)
thanks
- Tu
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
David Otton wrote:
On Sat, 28 Jun 2003 12:33:27 +0200, you wrote:
I have problem in including this text in my PHP parsed file for XHTML
definition:
It works if I remove the first line:
So, I am assuming PHP has problems with the symbols, as they are
recognised to be PHP code delimiters.
... and line 5 of reporter_view.php reads what? =/
Anders Thoresson wrote:
Hi,
I've a login script that works fine on my local server, but when I runs
it from my ISP I get the following error:
Warning: Cannot send session cookie - headers already sent by (output
started at /export/home/thore/pu
I would also advise to check for register_globals, since I have the
faint feeling it was OFF on your old version and ON in your new (though
most logcial would be viceversa :P)
Bobby Patel wrote:
maybe compare the php settings for both servers (using phpinfo()). Also
check the register globals s
Stevie Peele wrote:
What is the difference between "else if" and "elseif"?
Thanks
_
STOP MORE SPAM with the new MSN 8 and get 2 months FREE*
http://join.msn.com/?page=features/junkmail
else if shouldn't be used, use elseif, and th
with all the url parts in it, numbered
from 0->n
the htmlentities() makes sure that all html compatible chars get
transformed in to others, which look the same but don't work as html (eg
» and such).
Hope this helps,
- Tularis
XMB Lead Developer
Cj wrote:
I have a "contact us&qu
alues of the vars to a
specific one, without calling for something weird...
anyway, it doesn't work, and it doesn't spit out an error either.
Any ideas?
- Tularis
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
lass;
HTH,
Danny.
- Original Message -----
From: "Tularis"
To:
Sent: Thursday, November 14, 2002 8:18 PM
Subject: [PHP] OOP-related question
>Hey,
>I have the following script:
>class overall {
>
>function overall(){
>$this->loaded['overall'] =1;
>
>function
all header-modifying functions should be BEFORE any echoing is done, so:
session_start();
if(!session_is_registered("camion"))
DIE("error");
should be BEFORE:
Ysrael guzmán wrote:
THIS IS MY SCRIPT:
AND THE ERROR IS
Warning: Cannot send session cache limiter - headers already sen
the object is loaded, because the constructor is run, and
puts out a 1 onscreen... I wish to know how to make this work...
any help plz?
thanx
- Tularis
class overall {
var $loaded;
function load($class){
eval("\$$class = new $class;");
return true;
}
}
class foo {
var $
l->foo->bar() to $foo->bar(); as all the things I've
tried, don't work, they don't give any errors, except for
Fatal error: Call to a member function on a non-object in
d:\apache\htdocs\classes.php on line 42...
Could anyone help me with this?
thanx
- Tularis
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
actually, the foreach should read:
foreach($overall->loaded as $key=>$val){
$val =& $overall->$val;
}
still doens't work though
Tularis wrote:
Currently, I have the following code:
loaded[] = $class;
eval("\$this->$class = new $class;");
Yan Grossman wrote:
Hi,
I fixed my code to handle forms using $_REQUEST. Just having problem with
the fields with multiple contents...
the one you have to call like field[0], field[1],etc...
How do I use the brackets inside brackets?
my case is this:
Thanks.
I have fixed everything with $_REQUE
Phil Schwarzmann wrote:
Let's say you had one site and one site only to get the latest PHP/MySQL
news, articles, reviews, resources, tutorials, advanced stuff etc.
What would it be?!?
zend.com :)
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/
Tjoumaidis Tasos wrote:
Hello to everybody,
I just want to display a character like D x times like DDD where x is a
$variable i get from the database i cannot make it work like it is on
perl (i don't even know if it is working the same way) and i can't find
a reference in the manual on php.net,
ok, I have gotten great help here already, but it still doesn't work,
it returns a object not found error (on the $foo->bar() line). I want to
change $overall->foo->bar() to $foo->bar... any tips? or help??
thanx!
- Tularis
class overall {
var $loaded;
function loa
I was wondering if anyone knew of a way to return the processing time of
a mysql query via php.
And NOT using the
$starttime = time();
mysql_query($whatever);
$endtime = time();
$processingtime = $endtime - $starttime;
Does anyone please?
--
PHP General Mailing List (http://www.php.net/)
ey => $val){
echo "$val\r\n";
}
/*
$file will be an array where each index corresponds with a line from the
file.
so:
1 =>
2 =>
3 => blah
etc.
Hope that helps
- Tularis
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
to do this in
PHP. :-)
I would recommend Jeremy Zawodny's mytop:
http://jeremy.zawodny.com/mysql/mytop/
Chris
--- Tularis wrote:
>I was wondering if anyone knew of a way to return the processing
>time of a mysql query via php.
>
>And NOT using the
>
>$starttime = time();
why wouldn't it be??
it's clean code as long as you can read it without having to do much
trouble, and you have written it the shortest way possible with still
enough extra stuff around to make other ppl understand it...
so, I would say -> yeah, it's clean :)
- Tularis
Bea
if(a OR b) {
do something
} else {
do something else
}
or
if(a || b) {
do something
} else {
do something else
}
is enough :)
Robb Kerr wrote:
From time to time I need an If statement that includes an Or condition...
What's the correct syntax for the If line?
Thanx
--
PHP General Mailing List
Robb Kerr wrote:
I have a complicated table that needs to be altered depending upon the
contents of a field in one of my recordsets. I've tried several approaches
and need to know what you recommend.
I've created three totally different tables and put the HTML code for each
into a database. Then I
Robb Kerr wrote:
On Sat, 24 Jul 2004 23:23:49 +0200, Tularis wrote:
Robb Kerr wrote:
I have a complicated table that needs to be altered depending upon the
contents of a field in one of my recordsets. I've tried several approaches
and need to know what you recommend.
I've created thr
Matthew Weier O'Phinney wrote:
* Curt Zirzow <[EMAIL PROTECTED]>:
* Thus wrote Matthew Weier O'Phinney:
The problem I'm running into: what do I pass as arguments to catch()?
The articles on ZE2 use something like: catch (Exception $e) {}, or
something like catch(MyException $e) (where MyException i
you could write such a thing, in php, yourself aswell... wouldn't be
that hard :)
- Tul
Bruce wrote:
yeah...
i saw that write up. i've also inquired with bugs.mysql as to if/whether
this might be reinserted.. we'll see.
that said, it appears that there would need to be an approach similar to the
Robin Wilson wrote:
Hi
I get the following error message:
Fatal error: Call to undefined function: mail() in
/srv/www/htdocs/blog/serendipity_functions.inc.php on line 1394
I have changed my php.ini file to find the correct path to sendmail and to
put an option on the end (-f [EMAIL PROTECTED]) to
Eric Emminger wrote:
Hi George,
How about this?
parse the html as xml and replace the component tags with whatever php/html code
output that result to a file
include the file from previous step
Eric
On Tue, 6 Jul 2004 15:56:26 -0500, George Lantz
<[EMAIL PROTECTED]> wrote:
I am looking for a way to
Here's a quick script I wrote for it:
$deg = $_GET['deg']; // get from URL, for testing atm
$deg %= 360; // make sure it doesn't break on eg 560 degrees
$deg = ((ceil(($deg-22.5)/45))*45+22.5); // break it up into parts we
know, there might be an easier way though, just too tired to see it.
swit
Trejkaz Xaoza wrote:
Michael Ochs wrote:
Hi,
maybe you could try it with regular expressions! "[A-Z]:\\" or better
"[C-Z]:\\" because A and B is used just for floppy drives...
Take a look at www.php.net/preg_match/
I'm not sure if you noticed, but I said I wanted it to be portable.
Sure, "([A-Za-z
Programming PHP by O`Reilly :)
Lester Caine wrote:
Harlequin wrote:
There's loads and loads of books available on the subject of PHP & MySQL.
It would be nice to find one's that DON'T rely on MySQL ;)
Does anyone have any recommendations...?
Anybody seen a good NON MySQL one.
--
PHP General Maili
you need to call session_start() on every page, yes.
Also, if you're bored with assigning values like that, and you're sure
you're not overwriting anything, you could try:
$_SESSION = array('UserId'=>'userid', 'Authorised'=>'yes','etc'=>'blah');
However, remember that you don't need to REassign v
43 matches
Mail list logo