|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
php-general Digest 13 Oct 2005 03:32:32 -0000 Issue 3734
php-general-digest-help
lists.php.net
Date: Wed Oct 12 2005 - 22:32:32 CDT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
php-general Digest 13 Oct 2005 03:32:32 -0000 Issue 3734
Topics (messages 223963 through 224011):
pear.php.net
223963 by: Alex Moen
223964 by: Jay Blanchard
223966 by: Jochem Maas
223967 by: Alex Moen
223968 by: Alex Moen
Re: include file to global scope
223965 by: Jochem Maas
223991 by: cc
Removing Items from an Array
223969 by: Alan Lord
223971 by: Paul Waring
223972 by: tg-php.gryffyndevelopment.com
223976 by: Jochem Maas
223981 by: Alan Lord
SOAP WSDL location
223970 by: Marcus Bointon
Re: ICQ
223973 by: John Hinton
Optimize PDF on upload?
223974 by: Bosky, Dave
outputting xml with DOM and ampersands
223975 by: jonathan
224005 by: Stephen Leaf
Any good free easy converting tool?
223977 by: Gustav Wiberg
223978 by: Joe Harman
223979 by: Gustav Wiberg
223980 by: Gustav Wiberg
224007 by: Guy Brom
Possible bug with imagettftext and imageft text when imagealphablending is false
223982 by: Ethilien
ampersand in dom with utf-8
223983 by: jonathan
Re: Obsession with BC
223984 by: Richard Lynch
Re: onChange js running a php function
223985 by: Richard Lynch
actually the è not the ampersand
223986 by: jonathan
223989 by: John Nichel
223994 by: jonathan
array_slice and for loop problem
223987 by: Rodney Green
223997 by: Ethilien
pecl hosting is in a pickel...
223988 by: Steve Kiehl
Re: Userlogin system seems to override the if statement....
223990 by: cc
Obsession with BC, take 2
223992 by: GamblerZG
223993 by: Robert Cummings
224002 by: GamblerZG
224003 by: Oliver Grätz
Re: Run a php script as a separate thread/process
223995 by: cc
How can I connect a remote server from phpmyadmin?
223996 by: MI SOOK LEE
223998 by: Ethilien
224000 by: Ben
Re: Hidden Form Help
223999 by: Ethilien
Re: Store a variable name in a database field.
224001 by: cc
Trouble moving directory
224004 by: -k.
224006 by: Jasper Bryant-Greene
224010 by: -k.
Re: storing passwords in $_SESSION
224008 by: Dan Brow
Small regex help?
224009 by: Guy Brom
Re: Template Security Advice (WASP - http://wasp.sourceforge.net)
224011 by: Tom Rogers
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscribe
lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscribe
lists.php.net
To post to the list, e-mail:
php-general
lists.php.net
----------------------------------------------------------------------
attached mail follows:
I know this was asked already, but I am going to ask once more... Is
pear.php.net online? Here's why I ask:
pear list-upgrades
XML_RPC_Client: Connection to RPC server pear.php.net:80 failed. Connection
refused
Also, browsing to pear.php.net results in a page cannot be displayed error.
Thanks!
Alex Moen
Operations Technology Specialist
NDTC
attached mail follows:
[snip]
I know this was asked already, but I am going to ask once more... Is
pear.php.net online? Here's why I ask:
pear list-upgrades
XML_RPC_Client: Connection to RPC server pear.php.net:80 failed. Connection
refused
Also, browsing to pear.php.net results in a page cannot be displayed error.
[/snip]
Based on the overwhelming evidence I would have to say that it is offline
for the moment.
attached mail follows:
Jay Blanchard wrote:
> [snip]
> I know this was asked already, but I am going to ask once more... Is
> pear.php.net online? Here's why I ask:
>
> pear list-upgrades
> XML_RPC_Client: Connection to RPC server pear.php.net:80 failed. Connection
> refused
>
> Also, browsing to pear.php.net results in a page cannot be displayed error.
> [/snip]
>
> Based on the overwhelming evidence I would have to say that it is offline
> for the moment.
>
we cannot rule out the possibility that Alex' IP addr has been singled out for
discrimination ;-)
attached mail follows:
> -----Original Message-----
> From: Jochem Maas [mailto:jochem
iamjochem.com]
> Sent: Wednesday, October 12, 2005 10:03 AM
> To: Jay Blanchard
> Cc: 'Alex Moen'; php-general
lists.php.net
> Subject: Re: [PHP] pear.php.net
>
>
> Jay Blanchard wrote:
> > [snip]
> > I know this was asked already, but I am going to ask once more... Is
> > pear.php.net online? Here's why I ask:
> >
> > pear list-upgrades
> > XML_RPC_Client: Connection to RPC server pear.php.net:80
> failed. Connection
> > refused
> >
> > Also, browsing to pear.php.net results in a page cannot be
> displayed error.
> > [/snip]
> >
> > Based on the overwhelming evidence I would have to say that
> it is offline
> > for the moment.
> >
>
> we cannot rule out the possibility that Alex' IP addr has
> been singled out for
> discrimination ;-)
>
hehe... Pick on Alex day, huh?
I can ping pear.php.net, but the webserver seems to be ignoring me... Maybe
you're right! ;)
Alex Moen
Operations Technology Specialist
NDTC
attached mail follows:
Problem solved... The webserver on pear.php.net is working again.
Thanks to whoever fixed it!
Alex Moen
Operations Technology Specialist
NDTC
> -----Original Message-----
> From: Alex Moen [mailto:alexm
ndtel.com]
> Sent: Wednesday, October 12, 2005 10:09 AM
> To: 'Jochem Maas'
> Cc: php-general
lists.php.net
> Subject: RE: [PHP] pear.php.net
>
>
>
> > -----Original Message-----
> > From: Jochem Maas [mailto:jochem
iamjochem.com]
> > Sent: Wednesday, October 12, 2005 10:03 AM
> > To: Jay Blanchard
> > Cc: 'Alex Moen'; php-general
lists.php.net
> > Subject: Re: [PHP] pear.php.net
> >
> >
> > Jay Blanchard wrote:
> > > [snip]
> > > I know this was asked already, but I am going to ask once
> more... Is
> > > pear.php.net online? Here's why I ask:
> > >
> > > pear list-upgrades
> > > XML_RPC_Client: Connection to RPC server pear.php.net:80
> > failed. Connection
> > > refused
> > >
> > > Also, browsing to pear.php.net results in a page cannot be
> > displayed error.
> > > [/snip]
> > >
> > > Based on the overwhelming evidence I would have to say that
> > it is offline
> > > for the moment.
> > >
> >
> > we cannot rule out the possibility that Alex' IP addr has
> > been singled out for
> > discrimination ;-)
> >
>
> hehe... Pick on Alex day, huh?
>
> I can ping pear.php.net, but the webserver seems to be
> ignoring me... Maybe
> you're right! ;)
>
> Alex Moen
> Operations Technology Specialist
> NDTC
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
attached mail follows:
Claudio wrote:
> Is it possible to process the file in second php instance?
> An only get its output?
yes - but its heavy to do (which ever way you do it).
basically you need to either call a commandline php script
via exec() (or something similar) e.g.
exec('php /path/2/your/script.php'); // read the manual to
// find out how to get you output/data
or also go through the command line and use a tool like 'wget'
to call another url e.g:
exec('wget http://domain.com/script.php');
OR you could use file_get_contents() (or something similar to do what wget
does directly from within php ....
$output = file_get_contents('http://domain.com/script.php');
lots of possibilities - given what you are trying to do I doubt
that any possiblity is optimal - shoehorning other applications
into your own as standalone modules is an art form ;-)
>
> Claudio
>
attached mail follows:
yes, its possible, consider this:
/**
*
param $file_to_include path to php file you want to get its content
*
return included contents
*/
function get_output($file_to_include){
ob_start();
include $file_to_include;
return ob_get_clean();
}
of course, you may extend this function to better fit into your situation.
Good luck.
On 10/12/05, Claudio <karfunckel-php
yahoo.de> wrote:
> Is it possible to process the file in second php instance?
> An only get its output?
>
> Claudio
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
attached mail follows:
Hi all,
I'm really struggling here! I have a large, multi-dimensional array that
I want to "clean-up" a bit before committing to a database.
I want to remove quite a bit of the array but using the KEYs not the
values. I know the keys I want to keep and I know the keys I want to get
rid of. I want to keep the structure and sequence of the array in tact.
All of the array traversing functions in PHP seem to either: only work
on the values, or do not allow the removal of elements of the array!
Can anyone offer a clue bat to a tired old array walker!
Thanks
Alan
attached mail follows:
On Wed, Oct 12, 2005 at 05:24:11PM +0100, Alan Lord wrote:
> I'm really struggling here! I have a large, multi-dimensional array that
> I want to "clean-up" a bit before committing to a database.
How big an array? You could just go create another array of the same
structure and copy the values across (and the keys too if it's an
associative array) then remove all references to the old array and
commit the new one to the database..
Paul
--
Rogue Tory
http://www.roguetory.org.uk
attached mail follows:
If I understand what you're asking, then maybe this will help:
$arrset1 = array("Apples" => 3, "Oranges" => 5, "Apricots" => 1);
$arrset2 = array("Couches" => 6, "Chairs" => 2, "Benches" => 5);
$alldataarr["Fruits"] = $arrset1;
$alldataarr["Furniture"] = $arrset2;
Say we want to remove "Chairs", and let's do it the hard way:
foreach ($alldataarr as $key => $data) {
foreach ($data as $subkey => $subdata) {
if ($subkey == "Chairs) {
unset($alldataarr[$key][$subkey]);
}
}
}
using foreach $arr as $key => $data you can get the key/index name as well as the actual value stored in that part of your array. Then all you have to do is refer back up to the main array using the current $key/$subkey values as your indexes.
Basic example, but I think you can modify this to work with what you're doing.
Let me know if you have any questions about this example.
-TG
= = = Original message = = =
Hi all,
I'm really struggling here! I have a large, multi-dimensional array that
I want to "clean-up" a bit before committing to a database.
I want to remove quite a bit of the array but using the KEYs not the
values. I know the keys I want to keep and I know the keys I want to get
rid of. I want to keep the structure and sequence of the array in tact.
All of the array traversing functions in PHP seem to either: only work
on the values, or do not allow the removal of elements of the array!
Can anyone offer a clue bat to a tired old array walker!
Thanks
Alan
___________________________________________________________
Sent by ePrompter, the premier email notification software.
Free download at http://www.ePrompter.com.
attached mail follows:
Id like to continue where TG left off ...
hth.
tg-php
gryffyndevelopment.com wrote:
> If I understand what you're asking, then maybe this will help:
>
> $arrset1 = array("Apples" => 3, "Oranges" => 5, "Apricots" => 1);
> $arrset2 = array("Couches" => 6, "Chairs" => 2, "Benches" => 5);
>
> $alldataarr["Fruits"] = $arrset1;
> $alldataarr["Furniture"] = $arrset2;
>
> Say we want to remove "Chairs", and let's do it the hard way:
>
> foreach ($alldataarr as $key => $data) {
> foreach ($data as $subkey => $subdata) {
> if ($subkey == "Chairs) {
> unset($alldataarr[$key][$subkey]);
> }
> }
> }
>
> using foreach $arr as $key => $data you can get the key/index name as well as the actual value stored in that part of your array. Then all you have to do is refer back up to the main array using the current $key/$subkey values as your indexes.
>
$filter = array(
'Fruits' => array('Apples' => 1, 'Oranges' => 1),
'Furniture' => array('Couches' => 1, 'Chairs' => 1),
);
$alldataarr = array();
$alldataarr["Fruits"] = array("Apples" => 3, "Oranges" => 5, "Apricots" => 1);
$alldataarr["Furniture"] = array("Couches" => 6, "Chairs" => 2, "Benches" => 5);
foreach ($alldataarr as $key => $data) {
if (!isset($filter[$key]) {
// we want it all;.
continue;
}
$alldataarr[$key]= array_intersect_keys($data, $filter[$key]);
}
// heres one I prepared earlier:
/**
* array_intersect_keys()
* ^--- the internal function (php5.x+?) has no 's'
*
* returns the all the items in the 1st array whose keys are found in any of the other arrays
*
*
return array()
*/
function array_intersect_keys()
{
$args = func_get_args();
$originalArray = $args[0];
$res = array();
if(!is_array($originalArray)) { return $res; }
for($i=1;$i<count($args);$i++) {
if(!is_array($args[$i])) { continue; }
foreach ($args[$i] as $key => $data) {
if (isset($originalArray[$key]) && !isset($res[$key])) {
$res[$key] = $originalArray[$key];
}
}
}
return $res;
}
>
> Basic example, but I think you can modify this to work with what you're doing.
>
> Let me know if you have any questions about this example.
>
> -TG
>
>
>
> = = = Original message = = =
>
> Hi all,
>
> I'm really struggling here! I have a large, multi-dimensional array that
> I want to "clean-up" a bit before committing to a database.
>
> I want to remove quite a bit of the array but using the KEYs not the
> values. I know the keys I want to keep and I know the keys I want to get
> rid of. I want to keep the structure and sequence of the array in tact.
>
> All of the array traversing functions in PHP seem to either: only work
> on the values, or do not allow the removal of elements of the array!
>
> Can anyone offer a clue bat to a tired old array walker!
>
> Thanks
>
> Alan
>
>
> ___________________________________________________________
> Sent by ePrompter, the premier email notification software.
> Free download at http://www.ePrompter.com.
>
attached mail follows:
Thanks for the replies gents.
I have cludged together something from your solutions but it isn't yet
working. I've been staring at multi-dim arrays all day and am getting
tired, so I'll carry on tomorrow.
Thanks again,
Alan
> -----Original Message-----
> From: Jochem Maas [mailto:jochem
iamjochem.com]
> Sent: 12 October 2005 19:18
> To: tg-php
gryffyndevelopment.com
> Cc: php-general
lists.php.net; lord_alan
hotmail.com
> Subject: Re: [PHP] Removing Items from an Array
>
> Id like to continue where TG left off ...
>
> hth.
>
> tg-php
gryffyndevelopment.com wrote:
> > If I understand what you're asking, then maybe this will help:
> >
> > $arrset1 = array("Apples" => 3, "Oranges" => 5, "Apricots" => 1);
> > $arrset2 = array("Couches" => 6, "Chairs" => 2, "Benches" => 5);
> >
> > $alldataarr["Fruits"] = $arrset1;
> > $alldataarr["Furniture"] = $arrset2;
> >
> > Say we want to remove "Chairs", and let's do it the hard way:
> >
> > foreach ($alldataarr as $key => $data) {
> > foreach ($data as $subkey => $subdata) {
> > if ($subkey == "Chairs) {
> > unset($alldataarr[$key][$subkey]);
> > }
> > }
> > }
> >
> > using foreach $arr as $key => $data you can get the
> key/index name as well as the actual value stored in that
> part of your array. Then all you have to do is refer back up
> to the main array using the current $key/$subkey values as
> your indexes.
> >
>
> $filter = array(
> 'Fruits' => array('Apples' => 1, 'Oranges' => 1),
> 'Furniture' => array('Couches' => 1, 'Chairs' => 1), );
>
> $alldataarr = array();
> $alldataarr["Fruits"] = array("Apples" => 3, "Oranges" => 5,
> "Apricots" => 1); $alldataarr["Furniture"] = array("Couches"
> => 6, "Chairs" => 2, "Benches" => 5);
>
> foreach ($alldataarr as $key => $data) {
> if (!isset($filter[$key]) {
> // we want it all;.
> continue;
> }
> $alldataarr[$key]= array_intersect_keys($data, $filter[$key]); }
>
>
> // heres one I prepared earlier:
>
>
> /**
> * array_intersect_keys()
> * ^--- the internal function (php5.x+?)
> has no 's'
> *
> * returns the all the items in the 1st array whose keys are
> found in any of the other arrays
> *
> *
return array()
> */
> function array_intersect_keys()
> {
> $args = func_get_args();
> $originalArray = $args[0];
> $res = array();
>
> if(!is_array($originalArray)) { return $res; }
>
> for($i=1;$i<count($args);$i++) {
> if(!is_array($args[$i])) { continue; }
> foreach ($args[$i] as $key => $data) {
> if (isset($originalArray[$key]) && !isset($res[$key])) {
> $res[$key] = $originalArray[$key];
> }
> }
> }
>
> return $res;
> }
>
>
>
>
> >
> > Basic example, but I think you can modify this to work with
> what you're doing.
> >
> > Let me know if you have any questions about this example.
> >
> > -TG
> >
> >
> >
> > = = = Original message = = =
> >
> > Hi all,
> >
> > I'm really struggling here! I have a large, multi-dimensional array
> > that I want to "clean-up" a bit before committing to a database.
> >
> > I want to remove quite a bit of the array but using the
> KEYs not the
> > values. I know the keys I want to keep and I know the keys
> I want to
> > get rid of. I want to keep the structure and sequence of
> the array in tact.
> >
> > All of the array traversing functions in PHP seem to
> either: only work
> > on the values, or do not allow the removal of elements of the array!
> >
> > Can anyone offer a clue bat to a tired old array walker!
> >
> > Thanks
> >
> > Alan
> >
> >
> > ___________________________________________________________
> > Sent by ePrompter, the premier email notification software.
> > Free download at http://www.ePrompter.com.
> >
>
>
attached mail follows:
This is a minor thing that's been troubling me, making it difficult
to deploy a salesforce.com SOAP client across multiple projects.
Salesforce is a particular interest because its WSDL files are NOT
available directly online - you have to download and save local
copies manually.
When constructing a SOAPClient object, the WSDL parameter provided is
treated like a URL (because it will usually BE a URL). For 'local'
URLs, it searches the current directory, including any relative path
that it uses. However, because it is fundamentally a URL and not a
file request like an include, it does not search the include path.
The net result of this is that I'm having to copy my WSDL files into
every place that my class library is called from because the URL
resolution will only ever look in the calling directory and not in
the include path that allowed it to find my classes.
An alternative would be to allow providing the WSDL as a literal
string, probably read using file_get_contents() which does support
using the include path.
A worse solution is to provide the WSDL contents as the response to a
separate HTTP call (i.e. act like the WSDL is online after all). This
would work, but it's way less efficient.
I can't use an absolute path as it's deployed in multiple
configurations on multiple servers, and config is bad enough already.
Now before I report this as a bug/feature request, does anyone have
any better ideas?
Marcus
--
Marcus Bointon
Synchromedia Limited: Putting you in the picture
marcus
synchromedia.co.uk | http://www.synchromedia.co.uk
attached mail follows:
Al Hafoudh wrote:
> is it possible to connect to icq, send messages and etc? thanx
>
I looked all over that place for such a function some time back. I did
find several, but all were very old. The problem was they were all based
on the ICQ account number. Thinking about allowing such through the ICQ
network was an invitation to easy spamming. Just write a script rolling
through numbers and sending a message. I believe ICQ disabled this feature.
If you find out differently, please post your findings back to this list
as I have a client with this very request which I was unable to fulfill.
Best,
John Hinton
attached mail follows:
Any PHP modules available that will optimize PDF files on upload?
Thanks,
D
**********************************************************************
HTC Disclaimer: The information contained in this message may be privileged and confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to the message and deleting it from your computer. Thank you.
**********************************************************************
attached mail follows:
I am trying to output a file using DOM with php5.
It gives me an error with something like the following:
<item_name>farm lettuces with reed avocado, crème
fraîche, radish and cilantro</item_name>
It does have the encoding set to utf-8. When I switch it to utf-16,
it gives me an error on the $dom->saveXML();
Any ideas about how to fix this?
-jonathan
attached mail follows:
On Wednesday 12 October 2005 12:40 pm, jonathan wrote:
> I am trying to output a file using DOM with php5.
>
> It gives me an error with something like the following:
> <item_name>farm lettuces with reed avocado, crème
> fraîche, radish and cilantro</item_name>
Are you doing a:
DOMDocument::loadXML('<item_name>farm lettuces with reed avocado, crème
fraîche, radish and cilantro</item_name>');
You may have to manually convert the & to & tho I thought it did an
automatic convertion.
>
> It does have the encoding set to utf-8. When I switch it to utf-16,
> it gives me an error on the $dom->saveXML();
>
> Any ideas about how to fix this?
>
> -jonathan
attached mail follows:
Hi there!
Someone know of any good free tool for converting from Access to Mysql. I
just need to import certain tables into an already existance database.
/G
http://www.varupiraten.se/
attached mail follows:
On 10/12/05, Gustav Wiberg <gustav
varupiraten.se> wrote:
> Hi there!
>
> Someone know of any good free tool for converting from Access to Mysql. I
> just need to import certain tables into an already existance database.
>
> /G
> http://www.varupiraten.se/
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
Hey Gustav!!!
I use Navicat... i think they have a free trail package for their
software... it's the best that I can find out there!!
Good luck!
Joe
--
Joe Harman
---------
Do not go where the path may lead, go instead where there is no path
and leave a trail. - Ralph Waldo Emerson
attached mail follows:
Hi there!
I need to do a one time convert from an Access-databasetable to an
MySQL-database-table.
Is the MyODBC the only way?
/G
----- Original Message -----
From: "Jay Blanchard" <jay.blanchard
THERMON.com>
To: "'Gustav Wiberg'" <gustav
varupiraten.se>
Sent: Wednesday, October 12, 2005 8:56 PM
Subject: RE: [PHP] Any good free easy converting tool?
> [snip]
> Someone know of any good free tool for converting from Access to Mysql. I
> just need to import certain tables into an already existance database.
> [/snip]
>
> Isn't the MyODBC thingie free?
>
>
> --
> No virus found in this incoming message.
> Checked by AVG Anti-Virus.
> Version: 7.0.344 / Virus Database: 267.11.14/129 - Release Date:
> 2005-10-11
>
>
attached mail follows:
----- Original Message -----
From: "Joe Harman" <cjharman
gmail.com>
To: <php-general
lists.php.net>
Cc: "Gustav Wiberg" <gustav
varupiraten.se>
Sent: Wednesday, October 12, 2005 9:00 PM
Subject: Re: [PHP] Any good free easy converting tool?
On 10/12/05, Gustav Wiberg <gustav
varupiraten.se> wrote:
> Hi there!
>
> Someone know of any good free tool for converting from Access to Mysql. I
> just need to import certain tables into an already existance database.
>
> /G
> http://www.varupiraten.se/
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
Hey Gustav!!!
I use Navicat... i think they have a free trail package for their
software... it's the best that I can find out there!!
Good luck!
Joe
--
Joe Harman
---------
Do not go where the path may lead, go instead where there is no path
and leave a trail. - Ralph Waldo Emerson
--
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.11.14/129 - Release Date: 2005-10-11
Hi there!
Thanx!
/G
http://www.varupiraten.se/
attached mail follows:
Why don't you just import from Access to CSV and use LOAD DATA query on
MySQL?
""Gustav Wiberg"" <gustav
varupiraten.se> wrote in message
news:012101c5cf5f$ca05d5f0$0300a8c0
BLACKSHADOW...
>
> ----- Original Message -----
> From: "Joe Harman" <cjharman
gmail.com>
> To: <php-general
lists.php.net>
> Cc: "Gustav Wiberg" <gustav
varupiraten.se>
> Sent: Wednesday, October 12, 2005 9:00 PM
> Subject: Re: [PHP] Any good free easy converting tool?
>
>
> On 10/12/05, Gustav Wiberg <gustav
varupiraten.se> wrote:
>> Hi there!
>>
>> Someone know of any good free tool for converting from Access to Mysql. I
>> just need to import certain tables into an already existance database.
>>
>> /G
>> http://www.varupiraten.se/
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>
> Hey Gustav!!!
>
> I use Navicat... i think they have a free trail package for their
> software... it's the best that I can find out there!!
>
> Good luck!
> Joe
> --
> Joe Harman
> ---------
> Do not go where the path may lead, go instead where there is no path
> and leave a trail. - Ralph Waldo Emerson
>
>
> --
> No virus found in this incoming message.
> Checked by AVG Anti-Virus.
> Version: 7.0.344 / Virus Database: 267.11.14/129 - Release Date:
> 2005-10-11
>
> Hi there!
>
> Thanx!
>
> /G
> http://www.varupiraten.se/
attached mail follows:
I have been attempting to write a dynamic text replacement script that
would generate transparent PNGs using gd, and it works fine except when
one of the characters in a font has parts of it that overhang into the
previous characters. You can see what I mean in this test script:
<?php
$img = imagecreatetruecolor(200, 200);
imagealphablending($img, false);
$trans = imagecolortransparent($img);
imagefilledrectangle($img, 0, 0, 400, 400, $trans);
$green = imagecolorallocate($img, 6, 68, 0);
imagettftext($img, 30, 0, 10, 50, $green, "carolingia.ttf", "Linux");
header("Content-type: image/png");
imagesavealpha($img, true);
imagepng($img);
imagedestroy($img);
?>
The result can be seen at http://ethilien.net/tests/text.php
When you compare the text with what it should look like when I comment
out the imagealphablending($img, false); line here
http://ethilien.net/tests/text2.php you can see that the end of the 'u'
is cut off.
I think that this is because the lower-left slash of the 'x' overlaps it
and causes it to be overwritten.
This might be a bug in GD and not PHP, but I wanted to see if anyone has
encountered this problem before or if I'm just not doing something right.
Thanks,
-Connor McKay
attached mail follows:
I'm now getting this error:
XML Parsing Error: undefined entity
with the following entity at the first ampersand:
<item_name>farm lettuces with reed avocado, crème
fraîche, radish and cilantro</item_name>
Why is an ampersand considered an undefined entity? The xml version
is: <?xml version="1.0"?>
Any thoughts please?
-jonathan
attached mail follows:
On Tue, October 11, 2005 11:41 am, GamblerZG wrote:
> Recently, I asked my hosting provider when they are going to switch to
> PHP5. They replied that it will not happen any time soon, since they
> will install PHP5 only on new servers. Their reasoning was simple:
So ask them to move your account from the old server to the new server
and you get PHP5.
No big deal.
> <?php //parse this with mod_php4
> function class_method($var){ }
> ?>
> <?php5 //parse this with mod_php5
> class clazz implements Something{
> function method($var) {
> }
> }
> ?>
You'd need to have:
<?php //don't care which PHP
<?php4 //only PHP4 specific code
<?php5 //only PHP5
Then, the PHP Module would need to have both PHP4 and PHP5, and
conditionally execute vanilla/4/5 code within your page as it
processed it.
Anybody who's ever had to maintain C code with a bunch of conditional
platform-specific #ifdef code knows just how BAD a solution this is.
It's "fine" for an occasional, simple, minor difference at the beginning.
Then it turns into a nightmare of depedencies after a very brief period.
I don't think it's out of line for a host to NOT upgrade an existing
computer with 200+ clients, many of whom PROBABLY have installed and
not updated god-knows-what stupid Forum/Blog ware that will break and
have their clients all mad at them. Some of those packages probably
don't even HAVE PHP5-compatible versions yet, or at least not verions
you'd want to install on a production server.
Seems to me that your host should have offered to switch you to one of
the new PHP5 boxes, however, so you could have PHP5 if you want it.
Then everybody would be happy.
--
Like Music?
http://l-i-e.com/artists.htm
attached mail follows:
On Tue, October 11, 2005 3:11 pm, Dan McCullough wrote:
> Its been awhile since I tried this so I was wondering if anyone had
> any luck with this.
>
> I need to get a list of tables from a database, which means I have to
> run a function, I would like to have an onChange event run when I
> change my selection in a select menu, that would send the value for
> the select menu to a php function.
> can that be done?
Yes, but...
You can do it with XmlHttpRequest, or even just changing your
"location" in JavaScript.
But...
A) This doesn't really make any difference to the PHP code -- It's all
in the JS, so you should probably research in JS forums.
B) It's going to be DOG-SLOW if every menu change has to make a
round-trip to the web server and get stuff from the database, unless
it's a limited install on a LAN or other high-speed-only network.
--
Like Music?
http://l-i-e.com/artists.htm
attached mail follows:
so, the problem isn't the ampersand but rather the è in the
following:
<item_name>farm lettuces with reed avocado, crème
fraîche, radish and cilantro</item_name>
I'm not sure how php / DOM handles these non-standard other entities.
How would / could I escape this? do I need to convert it to something
else to make DOM happy (say grave) and then convert it back when
outputted? It seems like there might be a way to use
createEntityReference but searching through google shows no examples.
arg.....
I'm using php 5.0.3
-jonathan
attached mail follows:
jonathan wrote:
> so, the problem isn't the ampersand but rather the è in the
> following:
> <item_name>farm lettuces with reed avocado, crème fraîche,
> radish and cilantro</item_name>
>
> I'm not sure how php / DOM handles these non-standard other entities.
> How would / could I escape this? do I need to convert it to something
> else to make DOM happy (say grave) and then convert it back when
> outputted? It seems like there might be a way to use
> createEntityReference but searching through google shows no examples.
> arg.....
I have to do this to create XML documents for our company, and built
this function for it. You're welcome to use/modify it to fit your needs.
function convertString ( $string ) {
$find_array = array (
"/"/",
"/&/",
"/</",
"/>/",
"/ /",
"/¡/",
"/¢/",
"/£/",
"/¤/",
"/¥/",
"/¦/",
"/§/",
"/¨/",
"/©/",
"/ª/",
"/«/",
"/¬/",
"/­/",
"/®/",
"/¯/",
"/°/",
"/±/",
"/²/",
"/³/",
"/´/",
"/µ/",
"/¶/",
"/·/",
"/¸/",
"/¹/",
"/º/",
"/»/",
"/¼/",
"/½/",
"/¾/",
"/¿/",
"/À/",
"/Á/",
"/Â/",
"/Ã/",
"/Ä/",
"/Å/",
"/Æ/",
"/Ç/",
"/È/",
"/É/",
"/Ê/",
"/Ë/",
"/Ì/",
"/Í/",
"/Î/",
"/Ï/",
"/Ð/",
"/Ñ/",
"/Ò/",
"/Ó/",
"/Ô/",
"/Õ/",
"/Ö/",
"/×/",
"/Ø/",
"/Ù/",
"/Ú/",
"/Û/",
"/Ü/",
"/Ý/",
"/Þ/",
"/ß/",
"/à/",
"/á/",
"/â/",
"/ã/",
"/ä/",
"/å/",
"/æ/",
"/ç/",
"/è/",
"/é/",
"/ê/",
"/ë/",
"/ì/",
"/í/",
"/î/",
"/ï/",
"/ð/",
"/ñ/",
"/ò/",
"/ó/",
"/ô/",
"/õ/",
"/ö/",
"/÷/",
"/ø/",
"/ù/",
"/ú/",
"/û/",
"/ü/",
"/ý/",
"/þ/",
"/ÿ/"
);
$replace_array = array (
'"',
'&',
'<',
'>',
' ',
'¡',
'¢',
'£',
'¤',
'¥',
'¦',
'§',
'¨',
'©',
'ª',
'«',
'¬',
'­',
'®',
'¯',
'°',
'±',
'²',
'³',
'´',
'µ',
'¶',
'·',
'¸',
'¹',
'º',
'»',
'¼',
'½',
'¾',
'¿',
'À',
'Á',
'Â',
'Ã',
'Ä',
'Å',
'Æ',
'Ç',
'È',
'É',
'Ê',
'Ë',
'Ì',
'Í',
'Î',
'Ï',
'Ð',
'Ñ',
'Ò',
'Ó',
'Ô',
'Õ',
'Ö',
'×',
'Ø',
'Ù',
'Ú',
'Û',
'Ü',
'Ý',
'Þ',
'ß',
'à',
'á',
'â',
'ã',
'ä',
'å',
'æ',
'ç',
'è',
'é',
'ê',
'ë',
'ì',
'í',
'î',
'ï',
'ð',
'ñ',
'ò',
'ó',
'ô',
'õ',
'ö',
'÷',
'ø',
'ù',
'ú',
'û',
'ü',
'ý',
'þ',
'ÿ'
);
$string = htmlentities ( strip_tags ( preg_replace ( "/\n|\r|\r\n/", "
", $string ) ), ENT_QUOTES );
$string = preg_replace ( $find_array, $replace_array, $string );
return $string;
}
--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
john
kegworks.com
attached mail follows:
do you then have to do the reverse operation to get it back for
rendering. Since it was erroring on me during DOM creation, I feel
like I'm going around it to put it into a format it likes but then on
display via XSL transformation, I will have to convert it back. Or am
I missing something?
thanks again for your help.
jonathan
On Oct 12, 2005, at 2:17 PM, John Nichel wrote:
> jonathan wrote:
>
>> so, the problem isn't the ampersand but rather the è in
>> the following:
>> <item_name>farm lettuces with reed avocado, crème
>> fraîche, radish and cilantro</item_name>
>> I'm not sure how php / DOM handles these non-standard other
>> entities. How would / could I escape this? do I need to convert
>> it to something else to make DOM happy (say grave) and then
>> convert it back when outputted? It seems like there might be a
>> way to use createEntityReference but searching through google
>> shows no examples. arg.....
>>
>
> I have to do this to create XML documents for our company, and
> built this function for it. You're welcome to use/modify it to fit
> your needs.
>
> function convertString ( $string ) {
> $find_array = array (
> "/"/",
> "/&/",
> "/</",
> "/>/",
> "/ /",
> "/¡/",
> "/¢/",
> "/£/",
> "/¤/",
> "/¥/",
> "/¦/",
> "/§/",
> "/¨/",
> "/©/",
> "/ª/",
> "/«/",
> "/¬/",
> "/­/",
> "/®/",
> "/¯/",
> "/°/",
> "/±/",
> "/²/",
> "/³/",
> "/´/",
> "/µ/",
> "/¶/",
> "/·/",
> "/¸/",
> "/¹/",
> "/º/",
> "/»/",
> "/¼/",
> "/½/",
> "/¾/",
> "/¿/",
> "/À/",
> "/Á/",
> "/Â/",
> "/Ã/",
> "/Ä/",
> "/Å/",
> "/Æ/",
> "/Ç/",
> "/È/",
> "/É/",
> "/Ê/",
> "/Ë/",
> "/Ì/",
> "/Í/",
> "/Î/",
> "/Ï/",
> "/Ð/",
> "/Ñ/",
> "/Ò/",
> "/Ó/",
> "/Ô/",
> "/Õ/",
> "/Ö/",
> "/×/",
> "/Ø/",
> "/Ù/",
> "/Ú/",
> "/Û/",
> "/Ü/",
> "/Ý/",
> "/Þ/",
> "/ß/",
> "/à/",
> "/á/",
> "/â/",
> "/ã/",
> "/ä/",
> "/å/",
> "/æ/",
> "/ç/",
> "/è/",
> "/é/",
> "/ê/",
> "/ë/",
> "/ì/",
> "/í/",
> "/î/",
> "/ï/",
> "/ð/",
> "/ñ/",
> "/ò/",
> "/ó/",
> "/ô/",
> "/õ/",
> "/ö/",
> "/÷/",
> "/ø/",
> "/ù/",
> "/ú/",
> "/û/",
> "/ü/",
> "/ý/",
> "/þ/",
> "/ÿ/"
> );
> $replace_array = array (
> '"',
> '&',
> '<',
> '>',
> ' ',
> '¡',
> '¢',
> '£',
> '¤',
> '¥',
> '¦',
> '§',
> '¨',
> '©',
> 'ª',
> '«',
> '¬',
> '­',
> '®',
> '¯',
> '°',
> '±',
> '²',
> '³',
> '´',
> 'µ',
> '¶',
> '·',
> '¸',
> '¹',
> 'º',
> '»',
> '¼',
> '½',
> '¾',
> '¿',
> 'À',
> 'Á',
> 'Â',
> 'Ã',
> 'Ä',
> 'Å',
> 'Æ',
> 'Ç',
> 'È',
> 'É',
> 'Ê',
> 'Ë',
> 'Ì',
> 'Í',
> 'Î',
> 'Ï',
> 'Ð',
> 'Ñ',
> 'Ò',
> 'Ó',
> 'Ô',
> 'Õ',
> 'Ö',
> '×',
> 'Ø',
> 'Ù',
> 'Ú',
> 'Û',
> 'Ü',
> 'Ý',
> 'Þ',
> 'ß',
> 'à',
> 'á',
> 'â',
> 'ã',
> 'ä',
> 'å',
> 'æ',
> 'ç',
> 'è',
> 'é',
> 'ê',
> 'ë',
> 'ì',
> 'í',
> 'î',
> 'ï',
> 'ð',
> 'ñ',
> 'ò',
> 'ó',
> 'ô',
> 'õ',
> 'ö',
> '÷',
> 'ø',
> 'ù',
> 'ú',
> 'û',
> 'ü',
> 'ý',
> 'þ',
> 'ÿ'
> );
> $string = htmlentities ( strip_tags ( preg_replace ( "/\n|\r|\r
> \n/", " ", $string ) ), ENT_QUOTES );
> $string = preg_replace ( $find_array, $replace_array, $string );
> return $string;
> }
>
> --
> John C. Nichel
> ÜberGeek
> KegWorks.com
> 716.856.9675
> john
kegworks.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
>
attached mail follows:
Hello,
I'm using a for loop to iterate through an array and slice parts of
the array and add into another array.
When array_slice is called the variable $i is not being substituted
with the current value of
$i and the $output array is empty after running the script. Can
someone look at the code below and give me a clue as to why this
substitution is not happening? If I uncomment the "echo $i;" statement
the value of $i is printed just fine.
Thanks,
Rod
Here's my code:
$number = count ($int_range[start]);
//echo $number;
for ($i = 0; $i <= $number; $i++) {
//echo $i;
$output = array_slice ($textArray, $int_range[start][$i],
$int_range[end][$i]);
}
foreach ($output as $value) {
echo $value;
}
attached mail follows:
Are you trying to put each return from array_slice into $output as an
array? You need to replace $output = array_slice... with $output[] =
array_slice...
Also, you cannot just echo an array (even of characters). It must be a
string, or else echo will only produce the output 'Array'.
Hope this helps,
-Connor McKay
Rodney Green wrote:
> Hello,
>
> I'm using a for loop to iterate through an array and slice parts of
> the array and add into another array.
>
> When array_slice is called the variable $i is not being substituted
> with the current value of
> $i and the $output array is empty after running the script. Can
> someone look at the code below and give me a clue as to why this
> substitution is not happening? If I uncomment the "echo $i;" statement
> the value of $i is printed just fine.
>
> Thanks,
> Rod
>
> Here's my code:
>
>
> $number = count ($int_range[start]);
> //echo $number;
> for ($i = 0; $i <= $number; $i++) {
>
> //echo $i;
>
> $output = array_slice ($textArray, $int_range[start][$i],
> $int_range[end][$i]);
>
> }
>
>
>
>
> foreach ($output as $value) {
>
> echo $value;
> }
attached mail follows:
Has anyone noticed/experienced the fact that the pecl site is spotty
today? I think I was able to download one module all day in and out of
db connect errors.
I really need to get a module off of there. Is there some loop I can
jump through to get it?
Thanks,
- Steve
attached mail follows:
did u give proper username and password to login with?
On 10/12/05, twistednetadmin <twistednetadmin
gmail.com> wrote:
> I'm new to this. So I used a tutorial to write this. But it shows "Login
> ok.
> Welcome" at once when the page loads. Here is the tutorial:
> http://www.ss32.x10hosting.com/ss32/files/PHP-logins.pdf
> <?php
> include ("DBconnection");
>
>
> session_start();
> $err = 0;
> echo $err; //just to check. Shows 0
> $sql_login = sprintf("SELECT 'name', 'pass' FROM DB
> WHERE 'name'='%s' AND 'pass'='%s'",
$_GET['name'],
md5($_GET['pass']));
> $login = mysql_query($sql_login) or die(mysql_error());
> if (mysql_num_rows($login) == 0) {
> $GLOBALS['MM_username'] ==
$_GET['name'];
> echo $err; //just to check. Shows 0
> session_register("MM_username");
> echo $err; //just to check. Shows 0
> $err = 1;
>
>
> }
> echo $err; //just to check. Shows 1
> ?>
> <!-- Form -->
> <?php
> if ($err != 1) {
> if ($err == 2) { ?>
> There was an error processing your login.
> <?php } ?>
> <table>
> <form action="<?php $_SERVER['PHP_SELF']; ?>" method="get">
>
> <tr>
> <td align="center" valign="middle" class="maintext">
> Login as:<input name="name">
> </td>
> </tr>
> <tr>
> <td align="center" valign="middle" class="maintext">
> Password:<input name="pass" type="password"><br>
> </td>
> </tr>
> <tr>
> <td align="center" valign="middle" class="maintext">
> <input type="image" src="images/login_btn.jpg" value="login"></td>
> </tr>
> </form>
> </table>
>
> <?php
> }else{
> ?>
> Login ok. Welcome <?php
> echo "<meta http-equiv=Refresh content=3;url=1stpage.php>";
> }
> ?>
>
> I don't get any further. I must be missing something, but what??
>
> Please help.
>
> -Tore W-
>
>
attached mail follows:
Since nobody ansvered the real question my previous message, I will
re-phrase it.
PHP developers assume that PHP5 will be frequently used to parse PHP4
scripts. Why? And what's so horrible about using separate engines to run
php 4 and 5 scripts?
attached mail follows:
On Wed, 2005-10-12 at 17:31, GamblerZG wrote:
> Since nobody ansvered the real question my previous message, I will
> re-phrase it.
>
> PHP developers assume that PHP5 will be frequently used to parse PHP4
> scripts. Why? And what's so horrible about using separate engines to run
> php 4 and 5 scripts?
You can use separate engines. The topic has been addresses many times
already. Set up a second instance of apache and use the ProxyPass system
to pass control from the primary apache server to a PHP5 enabled apache
server. Ultimately though, the answer to why people want backward
compatibility, is because they want their libraries and applications to
be available to the widest possible audience.
Cheers,
Rob.
--
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'
attached mail follows:
Robert Cummings wrote:
> On Wed, 2005-10-12 at 17:31, GamblerZG wrote:
>
>>Since nobody ansvered the real question my previous message, I will
>>re-phrase it.
>>
>>PHP developers assume that PHP5 will be frequently used to parse PHP4
>>scripts. Why? And what's so horrible about using separate engines to run
>>php 4 and 5 scripts?
>
>
> You can use separate engines. The topic has been addresses many times
> already.
Yes, but separating PHP 4 and 5 is still a non-trivial task. For
example, IIRC, FreeBSD's port system does not allow you to install both
mods at the same time. Besides, developers do not expect PHP to be used
that way, so they are likely to sacrifice certain features for the sake
of compatibility.
--
Best regards,
Roman S.I.
http://sf.net/projects/naturalgine/
attached mail follows:
Robert Cummings schrieb:
> You can use separate engines. The topic has been addresses many times
> already. Set up a second instance of apache and use the ProxyPass system
> to pass control from the primary apache server to a PHP5 enabled apache
> server.
I always thought this complexity is why people are not doing this. I
read about patching the PHP5 sources so the internal names for the
module do not collide with those for PHP4. Then it's possible for bothe
modules to coexist in a single Apache instance. Why ist this not made
standard behaviour?
Oliver
____________
Zaan: "There is much cruelty in the universe."
John: "Yea, We seem to have the treasure map to it"
[FarScape 121]
attached mail follows:
Tommy, r u serious?
this ain't what you called 'thread or process',
just something like an user agent, like any web browser.
On 10/12/05, Tommy Jensehaugen <tommy_jensehaugen
hotmail.com> wrote:
> Thank you very much. This is what I ended up with if anyone needs it:
>
> <?php
> function runSeparateThread($strHost, $strPath="/") {
> $fFile = fsockopen($strHost, 80, $intError, $strError);
> if ($fFile) {
> $out = "GET ".$strPath." HTTP/1.1\r\n";
> $out .= "Host: ".$strHost."\r\n";
> $out .= "Connection: Close\r\n\r\n";
> if(!fwrite($fFile, $out)){
> $result = "runSeparateThread():fwrite(). Could not write:'".$out."'.
> Host:'".$strHost."'. Path:'".$strPath."'";
> } else {
> $result = true;
> }
> fclose($fFile);
> } else {
> $result = "runSeparateThread():fsockopen(): Could not connect to
> ".$strHost." (".$intError.") ".$strError.".";
> }
> return $result;
> }
> ?>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
attached mail follows:
Hello,
I have PhpMyAdmin 2.6.3 , MySQL 4.1.13 running in my Windows 2000.
I installed them using Apache friends XAMPP, so I didn¡¯t do any
configuration myself.
Currently if I go to http://127.0.0.1/phpmyadmin, then it automatically
shows my local MySQL db and tables.
Now I need to connect remote server(it has MySQL) and do some DB Admin of
that server.
How can I connect to that server from phpmyadmin?
I¡¯ve been trying to find if there any kind of connect panel in phpmyadmin,
but no fruit yet.
I really appreciate you guys help.
attached mail follows:
You need to edit the config.inc.php file in the phpmyadmin directory and
set the appropriate server address/username/password information for
your remote server. You might have to set a remote server up in cpanel
for this to work however.
MI SOOK LEE wrote:
> Hello,
> I have PhpMyAdmin 2.6.3 , MySQL 4.1.13 running in my Windows 2000.
> I installed them using Apache friends XAMPP, so I didn¡¯t do any
> configuration myself.
> Currently if I go to http://127.0.0.1/phpmyadmin, then it automatically
> shows my local MySQL db and tables.
> Now I need to connect remote server(it has MySQL) and do some DB Admin
> of that server.
> How can I connect to that server from phpmyadmin?
> I¡¯ve been trying to find if there any kind of connect panel in
> phpmyadmin, but no fruit yet.
>
> I really appreciate you guys help.
attached mail follows:
Ethilien said the following on 10/12/05 15:55:
> You need to edit the config.inc.php file in the phpmyadmin directory and
> set the appropriate server address/username/password information for
> your remote server. You might have to set a remote server up in cpanel
> for this to work however.
And of course the mysql server has to be configured to allow remote
access for the user(s) involved.
- Ben
attached mail follows:
To answer your questions:
1) No, there is no way to make data show up in both fields because the
script you are currently using is probably echoing the data directly
into a value attribute of the elements themselves. Also, by making two
different elements in the same form have the same name, and two
different page elements have the same id, you are introducing a level of
instability into the DOM that could result in no data being submitted at
all if some browsers do not handle multiple occurrences of the same id
in a page the same way (such as submitting the value from the first
occurrence of the name rather than the last, resulting in the input in
the hidden form being used).
2) Javascript would be your only hope of doing this, but as I said
regarding the DOM, their is no way to independently access two page
elements with the same id, so even Javascript cannot do this.
I would recommend that, even though the application does not allow
templating, you can still change its source code for displaying the form
to allow you to template it that way.
Hope this helps,
-Connor Mckay
Alnisa Allgood wrote:
> Hi-
>
> I'm in a situation where I'm required to deal with a hidden form. The
> background details are exhausting, but the gist is: one form is
> auto-generated and lacks proper formatting. It was part of an open
> source package that DID NOT allow templating. So to keep using the
> application engine, but provide formatting, I created a CSS class to
> hide the unformatted form while displaying the formatted form.
>
> When submitting data to the database this doesn't seem to cause any
> issues. It accepts data based on the fieldvalues and ids. But when
> retrieving data to repopulate the form, what happens is that the
> hidden form gets the values and the displayed form does not.
>
> http://nahic.ucsf.edu/phpESP/survey.php
> login= Wisconsin
>
> Basically, if you complete the required field (state), fill out some
> random data, hit save, then select "resume" from the info page
> provided. You'll get back an empty form. But if you look at the code
> you'll see that the hidden form has the values.
>
> So I have a few questions:
>
> 1) Is there anyway to echo data from one field to the next, especially
> if the field (name or id) are exactly the same?? (i.e. field=state
> value=Wisconsin; if the field state is then repeated somewhere else on
> the page, can the value, Wisconsin, also be automatically repeated.
>
> 2) If yes, to the above can PHP do this and how? or is this something
> requiring Javascript or some other coding.
attached mail follows:
Most likely you are using some template system that require using of
{{whatever}} as template varibles.
if you want to change {{whatever}} to something else, maybe you should
configure your template processing as well, just let it not to find
{{whatever}} but the pattern you prefered, and also replace
{{whatever}} with that pattern.
another tip, if you want to use `$' as literal , i.e. not
interpretered by php engine, quote the string with single quote.
like this:
$str_val='$something';
, or like this:
$str_val="\$something";
in both case, you will get a literal sting `$something'.
On 10/11/05, Liam Delahunty <liamvictor
gmail.com> wrote:
> I'm sure this is a pretty basic question, but I have searched for a
> decent answer and can't find one.
>
> I have a client that want to be able to write newsletters
> (newsleters_tbl.email_body) and use fields from his contact table, so
> as we grind through the contact list for newsletters subscribers it
> may pull out $first_name, or $last_name, or perhaps the address and so
> on, and send an individual email and have it in the $email_body field
> from another table.
>
> $email_body is a free form text field, and he wants to be able to type
> in anything he desires and have it pulled from the contact table.
>
> I've tried with and without addslashes, and htmlentities. Is there a
> solution or I will I have to resort to getting him to use
> {{$first_name}} etc.
>
> Lastly, if I have to use {{whatever}} then what's the reason I can't
> use $field_name in the database?
>
> --
> Kind regards,
> Liam Delahunty
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
attached mail follows:
I'm having trouble moving some directories. My script works fine on some directories but doesn't
move others. It seems to have trouble with directories with non alphanumeric charters. I'm running
Red Hat FC2. I'm trying to move the directory basically like this...
<?Php
$source_dir = '/some/dir/Dir That Won't Move/';
$dest_dir = '/some/other/dir/'
$cmd = escapeshellcmd("mv ".$source_dir." ".$dest_dir);
$result = shell_exec($cmd);
?>
Is there some way to escape the characters in the directories? For example if i put a "\" in front
of blank spaces it takes care of those (same for "'","(" etc.) but that obviously doesn't take
care of everything. I'm hoping there is something easy i'm overlooking here that will escape all
the characters.
-k.
__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com
attached mail follows:
-k. wrote:
> I'm having trouble moving some directories. My script works fine on
> some directories but doesn't move others. It seems to have trouble
> with directories with non alphanumeric charters. I'm running Red Hat
> FC2. I'm trying to move the directory basically like this...
>
> <?Php
>
> $source_dir = '/some/dir/Dir That Won't Move/';
$source_dir = escapeshellarg( '/some/dir/Dir That Won't Move/' );
> $dest_dir = '/some/other/dir/';
$dest_dir = escapeshellarg( '/some/other/dir/' );
>
> $cmd = escapeshellcmd("mv ".$source_dir." ".$dest_dir); $result =
> shell_exec($cmd);
>
> ?>
>
> Is there some way to escape the characters in the directories? For
> example if i put a "\" in front of blank spaces it takes care of
> those (same for "'","(" etc.) but that obviously doesn't take care of
> everything. I'm hoping there is something easy i'm overlooking here
> that will escape all the characters.
--
Jasper Bryant-Greene
Freelance web developer
http://jasper.bryant-greene.name/
attached mail follows:
--- Jasper Bryant-Greene <jasper
bryant-greene.name> wrote:
> $source_dir = escapeshellarg( '/some/dir/Dir That Won't Move/' );
Unfortunately escapeshellarg doesn't work for all cases, it will escape the " ' " in that example
but it doesn't escape other characters such as " ) ". So...
$source_dir = escapeshellarg( '/some/dir/Dir That (Won't Move)/' );
...fails as well. Any other ideas?
-k.
__________________________________
Yahoo! Music Unlimited
Access over 1 million songs. Try it free.
http://music.yahoo.com/unlimited/
attached mail follows:
On Tue, 2005-10-11 at 00:25 +0200, Oliver Grätz wrote:
> Dan Brow schrieb:
> > Thanks, figured that would be the case. Can't for life of me think why I
> > wanted to do that, must have had a brain infarction. I want to have an
> > expired session prompt so people can log back in with out having to
> > start at the login page. Would having the users login saved in $_SESSION
> > be alright? prompt them for their password and compare it with the
> > password in the DB be fine? I want to reduce the amount of typing
> > someone has to do when a session expires.
>
> Why don't you leave the decision if they want to type to the user?
> My browser keeps track of what I entered into every login form I ever
> visited...
This app is going to be in a Doctors office I don't want people storing
passwords on systems that have patient records.
Dan.
attached mail follows:
Can anyone suggest the correct regex to replace col1,col2... with count(*)
and strip out everything just before ORDER BY?
so for this:
SELECT col1,col2... FROM tbl WHERE filter1 filter2 ORDER BY order1,order2
I would get this:
SELECT count(*) FROM tbl WHERE filter1 filter2
Thanks!
attached mail follows:
Hi,
Tuesday, October 11, 2005, 3:37:13 PM, you wrote:
BF> I'm finishing up my WASP framework 1.0 release (http://
BF> wasp.sourceforge.net) and I'm trying to decide the best way to lay
BF> out the template directories.
BF> WASP uses HTML_Template_Flexy for its template system. The templates
BF> are compiled using "Chunk" classes that each refer to a html template.
BF> The way it works now, the directory structure of applications is
BF> |_ /webroot/module/templates
BF> where module is where the php classes are stored, and templates is
BF> where the html templates are stored. The templates used to be stored
BF> in a seperate directory outside of the web root, as such
BF> |_ /templates/
BF> |_ /webroot/ModuleDir
BF> however it becomes cumbersome to keep track of which templates go to
BF> which php classes, so for organization sake having the template
BF> directory located beneath each module directory is easier to navigate.
BF> My problem is, anyone who realizes a particular application uses WASP
BF> can go to a url, say http://blah/module, and look at the html files
BF> in the template directory (ex. http://blah/module/templates). Is it
BF> too much of a security issue to justify this useful organization?
BF> Theoretically the addition of an .htaccess file in the templates
BF> directories could solve the problem, but is that compounding the
BF> issue even more? I guess I'm asking for someone to tell me it's ok
BF> to do it this way, but if nobody agrees I can change it back.
BF> Thanks for the input.
BF> -Brian
BF> /**
BF> * Brian Fioca
BF> * Chief Scientist / Sr. Technical Consultant
BF> * PangoMedia - http://pangomedia.com
BF> *
work 907.868.8092x108
BF> *
cell 907.440.6347
BF> */
What about:
|_ /templates/ModuleDir
|_ /webroot/ModuleDir
Or even better if the modules should not be accessed directly
|_ /Modules/ModuleDir
|_ /Modules/ModuleDir/templates/
|_ /webroot/
ModuleDir
--
regards,
Tom
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]