is_integer probably wouldn't work, since you're dealing with strings here.
Your best friend here would probably be 'is_numeric' which would return true
on both the string '1' as the integer 1 true. As well as 1.1 and '1.1'. The
only one solution I could think if would be:
preg_match('/^\d+$/',
You best option would be to go through all of your include'd or require'd
files and make sure there is no whitespace before and after you open your
php tags. Those are often the cause for such problems. The easy way would
indeed be to use output buffering. In that case, put the call to ob_start();
You may want to look into shell_exec, which executes a command and returns
the output. If you're accepting arguments from user input, don't forget
proper use of escapeshellcmd and escapeshellarg ;-).
Something else that might cause your commands from failing, is that the
utilities are not inside
I often use MCImageManager, by moxiecode:
http://tinymce.moxiecode.com/paypal/item_imagemanager.php. Integrates well
into tinyMCE, but can be used without that as well.
I'm not entirely sure it's what you are looking for, but I think it very
well may be. And if it doesn't help you now, it may do
What you're proposing, is to actually display some content on another page
then were the content is originally intended? I'm sorry, but I would
consider that 'bad practice'. To me, it makes perfect sense that you don't
want to leave the user on the page where login was originally handled. For
On 20/08/07, tedd [EMAIL PROTECTED] wrote:
At 10:40 PM +0200 8/19/07, Wouter van Vliet / Interpotential wrote:
What you're proposing, is to actually display some content on another
page
then were the content is originally intended? I'm sorry, but I would
consider that 'bad practice'. To me
I hate to disappoint you, but there's no real alternative. Same annoyance
with get_class() and __CLASS__ always giving you the class in which the
call is defined instead of the class which is actually being called when
dealing with static methods.
What you could do is define a protected static
On 22/08/07, M. Sokolewicz [EMAIL PROTECTED] wrote:
I'm pretty sure
if(!empty($result_deferred_comments)) {
does something else than you think it does.
$result_deferred_comments = mssql_query($deferred_comments) or
die(mssql_error());
if it fetches any rows it will return a RESOURCE (yes,
You may want to look into the rowspan and colspan attributes of td
G'luck!
On 23/08/07, Phpmanni [EMAIL PROTECTED] wrote:
Hi
I need to represent a sort of map. The map is a rectangular
table of size X in widht and Y in height, so that I have X*Y
square cells. I need to record in a database
I've got a followup question to this. Whenever you're doing something that
takes too much memory, having a file uploaded that's bigger than max upload
size (actually, not sure if that applies but I think it does) or when your
script is taking too long to execute it just dies with a very unfriendly
I would go for:
if (isset($_REQUEST['gender'])) $_SESSION['registrationGender'] =
$_REQUEST['gender'];
print isset($_SESSION['registrationGender']) ? You are registered as
gender: .$_SESSION['registrationGender'] : Your gender is unknown;
And make no assumptions about a gender when you
On 27/08/07, Stut [EMAIL PROTECTED] wrote:
I use a slightly different approach to prevent the need to mess about
with files when moving to production. At the end on config.php I have
this...
if (file_exists('config_dev.php'))
require 'config_dev.php';
I've got my own variation on
On 30/08/2007, Per Jessen [EMAIL PROTECTED] wrote:
Wagner Garcia Campagner wrote:
Hello,
I'm building a web page just like a blog...
Where the user input some information... (name, website and comment)
This information is stored in a file...
And then the page displays it...
Karl,
Some simple checks on $contpath could solve your problem. Make sure that:
- it doesn't start with a /
- doesn't contain /../
- it doesn't contain a double slash //, or make sure the URL Fopen wrapper
is disabled:
http://nl3.php.net/manual/en/ref.filesystem.php#ini.allow-url-fopen
Hi Guys Gals,
I've been playing around with PHP 5.3 for a while now on development servers
and servers solely used for start-ups and lower-profile apps. But now I'm
about to upgrade the servers for a high profile/high traffic website and
with this upgrade I'd also like to make the switch from
I've had quite some luck using the html2text class by Jon Abernathy
http://www.chuggnutt.com/html2text.php
It's targetted to php 4, and rather old code - but it does the job for me.
Where the 'job for me' is converting html to text for when I'm sending out
emails in HTML format and want to
If you don't have access to do this, look at stripslashes()
And if you absolutely want to be on the safe side - check* if the
magic_quotes option is enabled - if so; do stripslashes. If not - then
obviously don't.
* http://www.php.net/manual/en/function.get-magic-quotes-gpc.php
--
Allen,
The short answer (but don't follow this):
?php
class Meetgreet {
public function deleteSingle($id, $number) {
// do something
global $Notify;
$Notify-addToQ( .. );
}
}
?
The long(er) answer:
I assume your Notifier object functions as singleton? Ie; accross your
cannot do what-not to
a non-object, can't remember the exact message at the moment)
On Tue, Dec 15, 2009 at 2:30 PM, Wouter van Vliet / Interpotential
pub...@interpotential.com wrote:
Allen,
The short answer (but don't follow this):
?php
class Meetgreet {
public function deleteSingle
What is the diference between using imagecreatefrompng() and readfile()?
Any performance improvement?
If you don't do any image minipulation, I would recommend readfile indeed.
The differences being that imagecreatefrompng load the image into memory,
ready to change it (overlay, rotate, crop,
20 matches
Mail list logo