y full of security issues. Then you would need a root cron job to parse
an external file owned by the web server that it queries for any updates that
are needed and does them for you.
--
regards,
Tom
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
find a way at all.
PL> Thank you all in advance.
PL> Regards,
PL> Peter
$out = $string1 ^ $string2;
--
regards,
Tom
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
LE> } //if($totalRows_Recordset1 > 0) {
LE>?>
LE>
LE>
LE>
LE> .. and so on ....
LE> When the query returns 60 rows I get ca. 7 blank lines between $row_Recordset1['mModell']; ?> and Kontonr.
LE> Does anyone understand? Anyone have a tip?
LE> Thanks a lot!
LE> Lars
maybe this line needs changing
to:
I think you need the comment
--
regards,
Tom
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi,
Tuesday, January 28, 2003, 12:47:05 PM, you wrote:
LE> You mean to comment out the while sentence?
LE> A do-while-loop won't work without the while-part would it? Comments are
LE> suplements to understand the code, not needed for the code to work.
LE> Thanks anyway
LE>
return $r;
}
function array_ref_unshift(&$array,&$ref){
array_unshift($array,'');
$array[0] =& $ref;
}
function &array_ref_shift(&$array){
$r =& $array[0];
array_shift($array);
return $r;
}
--
regards,
Tom
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
AHFe> PHP General Mailing List (http://www.php.net/)
EKAHFe> To unsubscribe, visit: http://www.php.net/unsub.php
I think your regex needs to look like this (from the manual):
$data_str = eregi_replace ("\[([[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/])\]", "\\1", $data_str);
The reason you were getting the wrong link was the href= was wrong so the
browser just used the page address as the href.
--
regards,
Tom
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
egister_globals on
--
regards,
Tom
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
RE productType = '$productType AND (productPublic = 'staff' OR productPublic =
'members')
ORDER BY productId DESC
LIMIT 10
--
regards,
Tom
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
K> entry.
JK> How do I access the data after the user presses submit?
JK> --
JK> Jim Kaufman mailto:[EMAIL PROTECTED]
JK> Linux Evangelistcell: 612-481-9778
JK> public key 0x6D802619 fax: 952-937-9832
JK> http://www.linuxforbusiness.net
ll
BS> Options FollowSymLinks
BS> NoParsePHP
BS>
BS> Can this be done? How? Perhaps as a php_value entry in the
BS> directive?
BS> Thanks,
BS> -Ben
you could try
php_flag engine = Off
--
regards,
Tom
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi,
Sunday, February 2, 2003, 11:07:20 PM, you wrote:
EEV> At 12:25 02.02.2003, Tom Rogers said:
EEV> [snip]
>>you could try
>>
>>php_flag engine = Off
EEV> [snip]
EEV> I'
sible then I'll just have to suck it up and rebuild this
BVB> thing for free but if I can find a way around that for the time being
BVB> then
Try creating an index on the field you want it ordered by
--
regards,
Tom
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
p of the page, for example
putenv('TZ=Australia/Brisbane');
Then date by itself will give the desired result
--
regards,
Tom
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ize is set in each call to
imagettftext() as one of the parameters.
--
regards,
Tom
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
on should I use
MB> to make this happen (run the script).
MB> Miguel
One simple way is with cron and a web page using lynx like this:
00 00 * * * /usr/bin/lynx -dump http://domain.com/countdown.php 1> /dev/null 2>
/dev/null
(-dump tells lynx to read the url, dump the page out and
I did it this way
untar libmcrypt and mcrypt into /usr/src
then in libmcrypt
./configure --prefix=/usr (could be /usr/local if you want
make
make install
ldconfig
cd ../mcrypt-2.6.3
./configure --prefix=/usr
make
make install
then in php
--with-mcrypt=/usr/src/mcrypt-2.6.3
--
regards,
Tom
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi,
Thursday, February 6, 2003, 12:30:01 AM, you wrote:
JCI> Tom Rogers wrote:
>>
>> I did it this way
>> untar libmcrypt and mcrypt into /usr/src
>> then in libmcrypt
>> ./configure --prefix=/usr (could be /usr/local if you want
>> make
>> make insta
t string as the date in the above code?
ehhc> TIA,
ehhc> Ed
If you change the format of your string you can do this:
$t = "20030205 1530";
echo 'New date/time = '.date("d/m/Y H:i",strtotime($t." + 28 days")).'';
--
regards,
T
ned cd)
AW> or D: (XPProCD), etc...If you know what I am talking about, is there a way
AW> to have PHP read that cd label?
AW> Adam
You could try the vol command using exec{} and parse out the volume name
--
regards,
Tom
--
PHP General Mailing List (
Hi, Adam
TR> You could try the vol command using exec{} and parse out the volume name
TR> --
TR> regards,
TR> Tom
This should do it:
';
?>
--
regards,
Tom
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi,
Thursday, February 6, 2003, 4:49:23 AM, you wrote:
JN> Guess it's not on Linux, eh? :)
JN> Adam Williams wrote:
>> Thanks Tom, that works perfect!
>>
>> Adam
>>
>> On Thu, 6 Feb 2003, Tom Rogers wrote:
>>
>>
I'm trying to set it up so that a random image from either a mysql table
or a text file list is displayed on a page each time a user goes to it.
I'm a little stumped as to how to do this with phpany suggestions?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http:/
;
}else{
echo $x.' Not empty check returns empty. ';
}
$test = '';
}
if($x == 2){
$test = 0;
}
if($x == 3){
$test = $x;
}
echo '';
}
--
regards,
Tom
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
PROTECTED]
You will probably find the microsoft font is unicode not Big5
--
regards,
Tom
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ar $db;
function a{
global $class_ref;
if(isset($class_ref['db'])){
$this->db =& $class_ref['db'];
}else{
$this->db = new db();
}
}
}
using $class_r
r
>> of the page, or will it generate output that will be executed?
>>
>> If the echo/print does not work, is there another way to do this?
>>
>> Cheers,
>> Daniel
>>
>>
Be aware that it could also ruin your life :)
It would be a good idea to store an
t; change anything in their scripts.
Have a look at msession, it was built for your situation.
--
regards,
Tom
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
r about a year without ever
having any problems. I have a class to replace the normal php session handler if
you would like to take a look at it.
--
regards,
Tom
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
n (get rid of junk functions :) and put into an auto prepend
file with the correct host
info for connecting, that way it would be transparent to your users.
I did my own class as the standard session stuff does not check for expired
data and msession has a simple method for checking this.
--
regards,
Tom
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
quot; as the
M> filename, but that also fails. I also tried to ftp_chdir() to the directory
M> first and get file.txt to no avail. Does anyone have any ideas on how to
M> GET a file that is in a directory with a space in it?
M> -Chris
Try escaping it $dir = "/remote/file\ dir/&
}
else{
$res = $res%10;
if($res > 0){
($left == 0)? $and = '':$and = ' and ';
$t = $this->words[0][$res]. " hundred".$and.$t;
}
else{
if($left > 0)$t = ' and '.$t;
}
$num = intval($num/1000);
$this->num($num);
}
return $t;
}
}
//usage
$n2t = new num_to_text();
for($num = 0;$num < 11;$num++){
echo $num.' '.$n2t->convert($num).'';
}
--
regards,
Tom
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
here.
j> thank you :)
These commands might help if they work with safe mode and your on unix of some
sort
echo exec("du -c -h /home/tigger",$results).'';
echo exec("du -c /home/tigger",$results).'';
--
regards,
Tom
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ECTED]>
PC> Operations / Abuse / Whatever
PC> it.canada, hosting and development http://www.it.ca/
This might get what you want, but to be accurate you will have to decide what to
do with the odd hours mins left over
$days = (strtotime("+1 month") - (dat
$sql .= ")";
But you are right there was a need to nuke the comma in the original script
--
regards,
Tom
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
left out. Here is the code I'm using:
Rec> $string = str_replace("'", "''", $string);
Rec> $string = stripslashes($string);
Rec> echo "";
Rec> Thanks
Rec> Dave
Pass the string through htmlentities(); before yo
[0];
A> but the echo function returns "Array".
A> Can anybody help me?
A> Thanks!
A> Andrea
Try like this
my_function(&$argument){
$argument[0] = 'test';
}
$array = array();
my_function($array);
echo $array[0];
The function declaration is what determins th
left out. Here is the code I'm using:
Rec> $string = str_replace("'", "''", $string);
Rec> $string = stripslashes($string);
Rec> echo "";
Rec> Thanks
Rec> Dave
You could also try
echo '';
which woul
anisation than a do/can't do situation. Classes help
keep all related functions and variables together. One thing springs to mind is
function names can be the same in different classes and they won't conflict
where with just functions by themselves they would have to be different.
--
r
at post
>> is not a valid method in shtml.
>>
>> I have also considered a session variable but since a session needs to
>> initiated or continued before anything is output to the browser that wont
>> work (I think).
>>
>> does anyone have a solution to get this to work?
>>
>> thanks,
>> Hans
>>
>>
Why are you trying to mix shtml and php ?
--
regards,
Tom
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
;> > Here's a snippet from:
>> > http://www.php.net/manual/en/language.operators.errorcontrol.php
>> >
>> > If the track_errors feature is enabled, any error message generated by
>> > the expression will be saved in the global variable $php_errormsg
ce a session needs to
>> initiated or continued before anything is output to the browser that wont
>> work (I think).
>>
>> does anyone have a solution to get this to work?
>>
>> thanks,
>> Hans
>>
>>
POST won't work easily with .shtml files so you are limited to GET and its
length limitations but the following works for me:
//test.php
';
}
}
print'
';
?>
(parse string seems to like adding slashes)
To use post you will have to post to a .php file to do the processing and
redirect to the .shtml file.
--
regards,
Tom
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
stats/invisman.phtml?"+r+"\"">http://domain.com.au/stats/invisman.phtml?"+r+"\"</a>;>")}
//-->
http://domain.com.au/stats/invisman.phtml?unknown+9"; BORDER=0>
(the +9 was a page id, invisman.phtml returned a transparent gif)
--
regards,
Tom
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
h"));
that way you just do include('file.inc') from anywhere and it will find your
files.
--
regards,
Tom
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi,
Sunday, February 23, 2003, 9:13:16 AM, you wrote:
CH> Hey Tom.
CH> Thanks for the idea; however, since we're not hosting the site on our own
CH> server, we don't have permissions for altering the php.ini file..
CH> --Noah
It only sets the ini path for the cur
e {
AC>echo 'Input looks fine. No unmatched tags.';
AC> }
The simplest is just to add directly to
the end of their
message, may not be technically correct but it won't do any harm either :)
--
regards,
Tom
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
nd){
$fix = '<'.$st.'>'; //create
an html end tag
}
break;
}
$out .= $match[0][$x];
o qmail.
HI> thanx
HI> Haseeb
HI> --- Msg sent via @Mail - http://atmail.nl/
Take a look at vpopmail, it will do all you need
http://www.inter7.com/vpopmail.html
--
regards,
Tom
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
PGP Fingerprint - C442 04E2 26B0 3809 8357 96AB D350 9596 0436 7C08
Try
$retval=getimagesize("http://armanii.c.crosslink.net/arcticsilver/dtmsig4.jpg",$info);
..seems to wake it up :) ..possible bug??
--
regards,
Tom
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
the following script (virt) in cgi-bin
#!/usr/bin/php
Then virtual('/cgi-bin/virt?id=1');
--
regards,
Tom
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
>> today. http://www.phparch.com/
TR> it shows up under
TR> _SERVER["QUERY_STRING"] => id=1
TR> I ran the following script (virt) in cgi-bin
TR> #!/usr/bin/php
TR> header('Content-type: text/plain');
TR> echo "\n";
TR> echo 'T
unset($users[3])
// now add it back
$userlist = implode(',',$users)
$list = $name.':'.$pass.':'.$gid.':'.$userlist;
$groups[$x] = $list;
}
$x++;
//here you could fputs to a temp file
() {
$theArray = array();
for ($i = 0; $i < 10; $i++) {
$theArray[] =& new Objects($i);
}
return $theArray;
}
$temp = getArrayOfObjects();
echo $temp[0]->id;
--
regards,
Tom
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ly because a space is a valid char in password
--
regards,
Tom
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi,
Friday, February 28, 2003, 5:39:39 PM, you wrote:
RK> Hello Tom,
RK> Thursday, February 27, 2003, 7:39:52 PM, you wrote:
TR>> Hi,
TR>> Friday, February 28, 2003, 12:20:38 PM, you wrote:
RK>>> I really need somebody to help me with this I am totally lost on what
;QUERY_STRING"] => id=1
>>
>> TR> I ran the following script (virt) in cgi-bin
>>
>> TR> #!/usr/bin/php
>> TR> > TR> header('Content-type: text/plain');
>> TR> echo "\n";
>> TR> echo 'Test script report';
KI> d:\apache_docroots\internal.infomart.ca\infodesk\test.php on line 8
PKI> Can anyone please help? Thanks
move session_start() to the first line in your file
--
regards,
Tom
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
This is a forwarded message
From: Tom Rogers <[EMAIL PROTECTED]>
To: Richard Kurth <[EMAIL PROTECTED]>
Date: Saturday, March 1, 2003, 5:59:11 PM
Subject: [PHP] Help!! with array's Please
===8<==Original message text===
Hi,
Saturday, March 1, 2003, 4
www.broadbandreports.com
you can do if(strtotime($mysq_timestamp) >= strtotime('24 hours ago')) {
strtotime can take a mysql timestamp directly I think
--
regards,
Tom
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I'm looking for a webbased interface that will allow me to managae mysql
databases. However, phpmyadmin has been ruled out due to the fact it
requires the username and password to be stored in the config file and
that it doesn't have any security to protect the average joe from
stumbling across it.
tried all the combinations of spaces and
jvc> no space in that line that I can think of.
jvc> So, what's wrong. Undoubtedly something obvious to anyone except me.
jvc> Janet
You have a space at the end of >>>EOD
Get rid of it and it should work
--
regards,
Tom
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
t;> > --
>> >>O Ernest E. Vogelsinger
>> >(\)ICQ #13394035
>> > ^ http://www.vogelsinger.at/
>> >
>> >
>> >
>> > --
>> > PHP General Mailing List (http://www.php.net/)
>> > To unsubscribe, visit: http://www.php.net/unsub.php
>> >
>>
>>
>>--
>>PHP General Mailing List (http://www.php.net/)
>>To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>>--
>>PHP General Mailing List (http://www.php.net/)
>>To unsubscribe, visit: http://www.php.net/unsub.php
JMC> --
JMC> PHP General Mailing List (http://www.php.net/)
JMC> To unsubscribe, visit: http://www.php.net/unsub.php
JMC> --
JMC> PHP General Mailing List (http://www.php.net/)
JMC> To unsubscribe, visit: http://www.php.net/unsub.php
Put phpinfo(); in your script and you should get an email from cron
with the output of your script. See if there is anything in there that
can give you a clue.
I ran your script using cli 4.3.0 and it worked fine.
What user are you running cron as?
--
regards,
Tom
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi,
Monday, March 3, 2003, 2:54:47 PM, you wrote:
JMC> Tom,
JMC> Did you run the script from cron? If so, what operating system are you
JMC> using? Putting PHP info in my script won't do me any good since cron
JMC> won't run it. The trouble is that cron does nothin
PROTECTED]
JMC> ADAM Software & Systems Engineer
JMC> First Creative
JMC> --
JMC> PHP General Mailing List (http://www.php.net/)
JMC> To unsubscribe, visit: http://www.php.net/unsub.php
Try removing the -q's and see if root or whatever user cron runs as gets
an email with an error message in it, as cron is actully having a
crack at running the script.
--
regards,
Tom
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
er"])) {
>> print("a-okay!");
>> } else {
>> print("error msg");
>> }
>>
>> I've submitted the ICQ # 2264532680, but it validates. Any ideas?
>>
My icq is 6 digits
--
regards,
Tom
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
0
JMC> Somnio World Web Solutions http://www.somnioworld.com
JMC> -Original Message-
JMC> From: Tom Rogers [mailto:[EMAIL PROTECTED]
JMC> Sent: Monday, March 03, 2003 6:23 PM
JMC> To: Justin Michael Couto
JMC> Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
JMC> S
;
$vars = '$subject = new foo2(';
if($num > 0) {
$i = 0;
foreach($params as $var){
$vars .= ($i > 0)? ',':'';
$vars .= (is_string($var))? "'".$var."'" : $var;
$i ++;
}
}
$vars .= ');';
eval($vars);
untested but is similar to something I use as a class loader with
unknown number of variables to pass.
--
regards,
Tom
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
o {
var $loader;
var $foo2;
function foo(){
this->loader =& new loaderClass('path_to_modules');
}
function load($var1,$var2,$var3){
$this->foo2 =&
$this->loader->load('foo2Class','foo2',$var1,$var2,$var3)
}
}
$f = new foo();
$f->load('Hello',2,3)
--
regards,
Tom
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
the session until the link is clicked but then
G> the session does not carry over to the next page. Any Ideas?
G> TIA
G> Gary
It's the '&' that they are objecting to, change this line in your php.ini to the
following:
arg_separator.output = "&"
Hi,
Wednesday, March 5, 2003, 1:47:39 PM, you wrote:
G> Tom Rogers wrote:
>> Hi,
>>
>> Wednesday, March 5, 2003, 12:45:27 PM, you wrote:
>> G> Hi All,
>> G>I need to suppress the session id in some links. The xhtml needs to
>> G> validate a
erous ways of adding/removing/changing double quotes and
HJ> single quotes around.
HJ> Any and all help would be greatly appreciated
HJ> Jess
You dont need quotes in the if bit just :
if($status == 'active'){
echo("active line\n");
}else{
echo("inactive line\n");
}
should work
--
regards,
Tom
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
sult)
SJ> {
SJ> echo "An error occurred when trying to update the DB";
SJ> }
SJ> else
SJ> {
SJ> echo "$result & Successfully updated the details";
SJ> }
SJ> }
You will need to use the global vars and also escape quotes like this:
function update_subscriber_account()
{
$new_email = addslashes($_POST['new_email']);
.
.
.
$query = "update subscribers
set email = '$new_email',
.
.
--
regards,
Tom
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
le sent field with the key #
$sql1="Update members set sent='$keys' where
email='$logged_email'";
$result=safe_query($sql1);
send_email();
needs $result3 or something
--
regards,
Tom
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
em to
see or do). I have seen this method used on other sites, but I prefer
to check with the experts first.
thanks,
--
Tom
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
KE '%"
.$searchword. "%' ORDER BY whatever ASC ".$limit;
$result = mysql_query($Query2) or die(mysql_error());
$hstring = $page->make_head_string('Results');
$pstring =
$page->make_page_string("&searchword=".$searchword."&whatever=".$whatever);//add
the other variables to pass to next page in a similar fashion
echo "".$hstring."";
while($row = mysql_fetch_array($result)){
echo "".$show_data_here."";
}
echo "".$pstring."";
}
?>
Note: the search variables on subsequent pages will be passed by GET method
--
regards,
Tom
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I have found this to the best tutorial I have seen yet on sessions...its
very straight forward, and took care of a lot of questions that I had.
http://www.sitepoint.com/article/319/95
--
Tom Woody
Systems Administrator
Don't throw your computer out the window,
throw the Windows out of
n true or false or something when
MW> this is processed. I.E. if the Where clause fails it would report back
MW> fail? Or do I first need to check the status with a select?
MW> Thank you,
MW> Mike Walth
MW> CinoFusion
If using mysql you can use
if(mysql_affected_rows()){
ech
efromjpeg($filename);
imagegammacorrect($im,1,2.2);
Header("Content-type: image/jpeg");
ImageJpeg($im,'',50);
--
regards,
Tom
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Is there an easy way to display the epoch time given by time() in a human
readable format? Basically, if I do $time = time(); and the insert that
data into my mysql database and then pull that information out again how
do I make it look like 2003-03-13 or a variant of that?
TIA
--
PHP General M
On Thu, 13 Mar 2003 12:07:33 -0500
"Tom Ray" <[EMAIL PROTECTED]> wrote:
> Is there an easy way to display the epoch time given by time() in a
> human readable format? Basically, if I do $time = time(); and the
> insert that data into my mysql database and then pull tha
gecreatefromjpeg($filename);
$dim = imagecreatetruecolor($cropW, $cropH);
for ( $i=$cropY; $i<($cropY+$cropH); $i++ ) {
for ( $j=$cropX; $j<($cropX+$cropW); $j++ ) {
$pixel = imagecolorat($im, $x, $y);
imagesetpixel($dim, $j-$cropX, $i-$cropY, $pixel);
}
}
As it is true colour no need to use indexes.
--
regards,
Tom
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ed space of the source image
AR>> imagedestroy($dim);
AR>> }
AR>> // example
AR>> im_crop(0,0,75,75,'1_data.jpeg','2_data.jpeg','jpeg');
?>>>
TR> With jpegs you need to use $im2 = imagecreatetruecolor($x,$y)
TR> and just write the pix
... first off how are
we supposed to help you with the problem if we don't know what is on
line 202. Are we supposed to be clairvoyent, or should we divine the
answer from tea leaves. Without the code, or at least the code around
line 202 you are asking the impossible yes this would make
($dim);
AR> }
AR> // example
AR> im_crop(0,0,75,75,'1_data.jpeg','2_data.jpeg','jpeg');
?>>
AR>
AR> Fatal error: imagecreatetruecolor(): requires GD 2.0 or later in
AR> c:\apache\htdocs\testphoto.php on line 6
AR> ---
AR>
gv[0] will give you the command used to invoke the script (including the path)
--
regards,
Tom
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
of my script is a header() redirect so it must be returning a
JG> header right?
JG> Joshua Groboski
You may need to add an empty line after the header.
--
regards,
Tom
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
it carry on with test2 and 3 anyway, regardless of how test1
came out?
if(!(test1 || test2 || test3)){
echo "Failed";
}else{
echo "Success";
}
--
regards,
Tom
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi,
Friday, March 14, 2003, 10:36:50 AM, you wrote:
ED> Hi,
ED> I'm testing the last php5/ze2 snapshot for a future PHP application. I've
ED> a two line script[1] with domxml wich fail with ZE2 but succeed with ZE1.
ED> I know that ZE2 is in pre-alpha cycle (and domxml on a experimental state)
E
Hi,
Friday, March 14, 2003, 11:54:00 AM, you wrote:
ED> On Fri, 14 Mar 2003 11:37:05 +1000, Tom Rogers wrote:
>> I think that should be > 1,0
ED> You're right, sorry
ED> I've made an error writing this post ("." on the numeric pad output ","
le and it is fine (not
>> >zero).
>> >
>> >I think there is a timing issue with php on file read/writes. I tried
>> >sleep(1), but all that did was slow the script down (didn't help).
>> >
>> un-educated guess:
>> did you try fcl
ssions across our servers as well.
MR>
MR> Maureen Roihl
MR> Senior Web Developer
MR> Smarter Living
MR> [EMAIL PROTECTED]
You could use something like this
Then the log formatter line needs \"%{PHP_TITLE}n\" adding
--
regards,
Tom
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
values.
CK> for example:
CK> $dra_1 = 5;
CK> $dra_2 = 8;
CK> $dra_3 = 9;
CK> How would I do this? A variable that has a variable name based on a
CK> counter in the loop? Not sure the syntax for that.
CK> Thanks
CK> Charles
something like this...
while(list($key,$val)
Hi,
Sunday, March 16, 2003, 8:20:49 AM, you wrote:
CK> Tom,
CK> This seems like what I need exactly, but I am having a bit of trouble
CK> getting it to work.
CK> Here is how I have worked around this, but I know there is a 'real' way
CK> to do this. Any thoughts? I
(&$variable1, &$variable2){
$variable1 = "Something different from it's original value"
$variable2 = "I'm changed also!!"
}
(notice the '&' symbols)
--
regards,
Tom
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
1.0");
$table = $doc->create_element("table");
$row = $doc->create_element("row");
$col = $doc->create_element("td");
$root = $dom->document_element();
$t1 = $root->append_child($table);
$r1 = $t1->append_child($row);
$c1 = $r1->append
7;);
$t = new kwikTemplateClass('./');
$variables = array();
echo $t->processFile('layout.htm',$variables);
?>
This loads the class I need and it is automatically global..
--
regards,
Tom
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
T> Thanks
try php_flag instead of php_value (flags are on or off, values usually
contain things like numbers or paths)
--
regards,
Tom
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
;
KB> }
print $current; ?>>
KB> --
KB> Kyle
maybe you need to end the if() statement before incrementing the
counter.
$ip = getenv('REMOTE_ADDR');
$ipCheck = file('ips.txt');
if (!in_array($ip, $ipCheck)) {
$ipAdd = fopen('ips.txt', 'a
Hi,
Sunday, July 6, 2003, 3:15:56 AM, you wrote:
TR> When is the relase date for php 5?
at this point I think the only digits filled in are
200x-xx-xx
--
regards,
Tom
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
g AND the closing double quote, paren, semicolon,
question mark, and >> on a new line. What the hell is going on here?
a> PHP is running.
");?>>
make sure you have a line like
AddType application/x-httpd-php .php
in httpd.conf and that you restarted apache
--
regards
st sends the stuff :)
(Would be good for template systems where you know there is no php
hidden in there.) ... might gain a couple of micro seconds
--
regards,
Tom
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
201 - 300 of 1845 matches
Mail list logo