php-general Digest 1 May 2009 13:29:28 - Issue 6097
Topics (messages 292168 through 292178):
Re: Two very useful PHP functions
292168 by: Raymond Irving
292172 by: Darren
ImageMagick
292169 by: Michael A. Peters
292170 by: Ashley Sheridan
292171 by:
php-general Digest 2 May 2009 02:09:48 - Issue 6098
Topics (messages 292179 through 292204):
how to enable ttf support in php 5.2.9
292179 by: PJ
292182 by: Michael A. Peters
292183 by: Michael A. Peters
Re: Upload file name not file
292180 by: MikeP
Here's the scenario -
Website has some demonstrative images.
I create these images with the gimp - starting with a jpeg, adding a few
text layers and straight lines.
I then save as xcf in case I ever need to edit.
Then I export to jpeg, resize for thumb and export to jpeg again.
Admin
On Thu, 2009-04-30 at 23:35 -0700, Michael A. Peters wrote:
Here's the scenario -
Website has some demonstrative images.
I create these images with the gimp - starting with a jpeg, adding a few
text layers and straight lines.
I then save as xcf in case I ever need to edit.
Then I
Ashley Sheridan wrote:
Do the text layers have to go beneath something on the original xcf, or
have special effects applied to them? If not, you can add t existing
images with GD, by using a source image, adding text layers, etc, and
then exporting it as a new graphic.
Yeah - I know I can
This was discussed for PHP6, but eventually decided not to have such a
function. Instead, we now have the following:$var = $_GET['var'] ?: 5;
Taken from http://www.corephp.co.uk/archives/19-Prepare-for-PHP-6.html
'you'd be able to do something like this: $foo = $_GET['foo'] ?: 42; (i.e.
if
Hi,
$x = (object) array('a'=1, 'b'=3, ...);
which works but isn't very lovely. it's neater in, for example, javascript.
Well, you could wrap it up in a function to make it a bit lovelier. Eg:
$foo = createObject(array('key' = 'value'));
It's not great, but PHP doesn't have a object
Richard Heyes wrote:
Hi,
$x = (object) array('a'=1, 'b'=3, ...);
which works but isn't very lovely. it's neater in, for example, javascript.
Well, you could wrap it up in a function to make it a bit lovelier. Eg:
$foo = createObject(array('key' = 'value'));
It's not great, but
This one time, at band camp, Michael A. Peters wrote:
Here's the scenario -
Website has some demonstrative images.
I create these images with the gimp - starting with a jpeg, adding a few
text layers and straight lines.
I then save as xcf in case I ever need to edit.
Then I export
Hello,
Id like to use the popup file system box(input name=userfile type=file
/) to choose a file name , but I only want to upload the filename , not the
file. Can I do that?
Thanks
Mike
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi,
You could use JSON,
$foo = json_decode('{a:1,b:3}');
but I guess that's not much better than Richard's suggestion.
Didn't think of that (well... it's new). That's actually much better I
think, since you get the added boon of ease of portability to JS (if
that's even a factor).
--
Id like to use the popup file system box(input name=userfile type=file
/) to choose a file name , but I only want to upload the filename , not the
file. Can I do that?
You're not supposed to have any access to the remote visitor's
computer, and the path to the file being uploaded could contain
Is there a module to be activated or what has to be installed to have
ttf support in php?
My port on FreeBSD does not have an option for ttf support under make
config .
I'm trying to learn understand the following:
In file1 : img src=button.php?s=36text=PHP+is+Cool /
In file2 (button.php)-
I'm not trying to get the path, just the filename and size, I know how to
get these, but that would include the file using $_Files, but I dont want to
upload anything just use the filename and size.(without the path) to insert
into a DB.
Simon turne...@gmail.com wrote in message
On Fri, May 1, 2009 at 4:05 AM, Darren dar...@sirdaz.com wrote:
This was discussed for PHP6, but eventually decided not to have such a
function. Instead, we now have the following: $var = $_GET['var'] ?: 5;
Taken from http://www.corephp.co.uk/archives/19-Prepare-for-PHP-6.html
'you'd be
PJ wrote:
Is there a module to be activated or what has to be installed to have
ttf support in php?
on unix systems, ttf support should be there with freetype - which
supports both ttf and postscript type 1 fonts (and probably also
supports .otf though I haven't tried)
enable freetype and
PJ wrote:
Is there a module to be activated or what has to be installed to have
ttf support in php?
addendum to my earlier reply -
make sure your gd library is built with freetype as well, and make sure
it is freetype 2.
I'm guessing your gd library already is, but ...
--
PHP General
Hi Everyone,
I'm trying to get Chrome to output html information as it comes thru. We
have an iframe running a php script, and when the php script receives
information, it outputs it. FF, IE, and Safari all work just fine, displays
the info as it comes in. However, Chrome is not. It will only
On Fri, 2009-05-01 at 10:24 -0400, Dan Joseph wrote:
Hi Everyone,
I'm trying to get Chrome to output html information as it comes thru. We
have an iframe running a php script, and when the php script receives
information, it outputs it. FF, IE, and Safari all work just fine, displays
the
On Fri, May 1, 2009 at 10:29 AM, Robert Cummings rob...@interjinn.comwrote:
Have you tried a bigger pad? Try... oh I dunno... 40096. if that works
then you can chop back until you find the threshold. Seems to be though
that it might be better done as AJAX.
Hi,
I tried that, didn't work at
On Fri, 2009-05-01 at 10:34 -0400, Dan Joseph wrote:
Ajax unfortunately isn't an option in this particular case.
Why? Maybe you're thinking about it wrong.
Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP
--
PHP General Mailing List
On Fri, May 1, 2009 at 10:40 AM, Robert Cummings rob...@interjinn.comwrote:
On Fri, 2009-05-01 at 10:34 -0400, Dan Joseph wrote:
Ajax unfortunately isn't an option in this particular case.
Why? Maybe you're thinking about it wrong.
Maybe, I'm open to suggestions:
Here's the basic way
I am writing CMS, that will be able to edit files.
For editing I put file inside textarea, but when I open file that has
textarea element inside it I lose (read: don't show data in the
textarea element.) the data after the inside /textarea element.
Any suggestions how can I fix this?
Thanks in
On Fri, May 1, 2009 at 10:44 AM, Grega Leskovsek mavri...@gmail.com wrote:
I am writing CMS, that will be able to edit files.
For editing I put file inside textarea, but when I open file that has
textarea element inside it I lose (read: don't show data in the
textarea element.) the data after
On Fri, 2009-05-01 at 10:42 -0400, Dan Joseph wrote:
On Fri, May 1, 2009 at 10:40 AM, Robert Cummings rob...@interjinn.comwrote:
On Fri, 2009-05-01 at 10:34 -0400, Dan Joseph wrote:
Ajax unfortunately isn't an option in this particular case.
Why? Maybe you're thinking about it
On Fri, May 1, 2009 at 10:55 AM, Robert Cummings rob...@interjinn.comwrote:
I presume your backend script is running something that passes the data
to the browser un-interrupted... maybe a shell script? You can wrap this
in popen() or proc_open() and read the output as you would a file. This
var o = {
a : b,
c : d
};
$o = array(
'a' = b,
'c' = d
);
so I guess the problem is a couple of quotes, isn't it?
otherwise define object statically and externally and use json_decode ;-)
Date: Thu, 30 Apr 2009 16:56:21 -0400
From: f...@thefsb.org
To:
On Fri, 2009-05-01 at 17:36 +0200, Andrea Giammarchi wrote:
var o = {
a : b,
c : d
};
$o = array(
'a' = b,
'c' = d
);
so I guess the problem is a couple of quotes, isn't it?
otherwise define object statically and externally and use json_decode ;-)
You made an
you are in PHP, not in JavaScript.
In PHP arrays are like collections or hash tables.
if you strictly need object cause
$o-stuff
is better than
$o['stuff']
having exactly the same number of characters, you can create a function like
function o(array $a){
$o = new stdClass;
With the wide range of users on the list, I'm sure there are plenty of
opinions on what are good graphical IDE's and which ones to avoid. I'd
like to get away from using notepad.exe to code with due to its
limitations. Something that supports syntax/code highlighting and has
browser previews
On Fri, 2009-05-01 at 17:52 +0200, Andrea Giammarchi wrote:
you are in PHP, not in JavaScript.
In PHP arrays are like collections or hash tables.
if you strictly need object cause
$o-stuff
is better than
$o['stuff']
having exactly the same number of characters, you can create a
Adam Williams wrote:
With the wide range of users on the list, I'm sure there are plenty of
opinions on what are good graphical IDE's and which ones to avoid. I'd
like to get away from using notepad.exe to code with due to its
limitations. Something that supports syntax/code highlighting and
On Fri, May 1, 2009 at 9:34 AM, MikeP mpel...@princeton.edu wrote:
I'm not trying to get the path, just the filename and size, I know how to
get these, but that would include the file using $_Files, but I dont want to
upload anything just use the filename and size.(without the path) to insert
Michael A. Peters wrote:
Adam Williams wrote:
With the wide range of users on the list, I'm sure there are plenty of
opinions on what are good graphical IDE's and which ones to avoid.
I'd like to get away from using notepad.exe to code with due to its
limitations. Something that supports
On Fri, 01 May 2009 12:57:25 -0400
Al n...@ridersite.org wrote:
Michael A. Peters wrote:
Adam Williams wrote:
With the wide range of users on the list, I'm sure there are
plenty of opinions on what are good graphical IDE's and which ones
to avoid. I'd like to get away from using
http://notepad-plus.sourceforge.net/uk/site.htm
Try out N++. It's very good, supports a whole bunch of languages by
default, has folding, and you can tweak the syntax highlight if you
want. (You don't need to though.)
Takes two minutes to install, and 45 seconds to uninstall it if you
don't like
Adam Williams wrote:
With the wide range of users on the list, I'm sure there are plenty of
opinions on what are good graphical IDE's and which ones to avoid. I'd
like to get away from using notepad.exe to code with due to its
limitations. Something that supports syntax/code highlighting and
Hello Guys,
I use SOAP calls to make web service requests.I have a class that does
webservice calls to various wsdls. So my question is about try catch blocks.
so my method looks like this:
private function method($cookie){
//Define Client
try{
// Check if WSDL exists
In another thread (which I mercifully declined to highjack), someone
cited:
Taken from http://www.corephp.co.uk/archives/19-Prepare-for-PHP-6.html
And I read this:
Both '$foo = new StdClass()' and 'function foo' will now raise an
E_STRICT error.
I don't use this much, but where I do, it's
39 matches
Mail list logo