php-general Digest 23 Nov 2010 15:23:27 -0000 Issue 7050

2010-11-23 Thread php-general-digest-help

php-general Digest 23 Nov 2010 15:23:27 - Issue 7050

Topics (messages 309612 through 309637):

Re: Wordpress Page: How to add pagination?
309612 by: Steve Staples

Can't find existing file
309613 by: Dee Ayy
309614 by: Daniel P. Brown
309615 by: Daniel P. Brown
309616 by: Dee Ayy
309617 by: Daniel P. Brown
309630 by: Dee Ayy
309632 by: Daniel Brown

Re: Problem with functions and arrays...
309618 by: Jason Pruim

Procedural Autoloader?
309619 by: Jason Pruim
309621 by: David Harkness
309622 by: Daniel P. Brown
309623 by: Daniel P. Brown
309624 by: Nathan Nobbe
309626 by: Daniel P. Brown
309627 by: Peter Lind
309628 by: Daniel Brown
309629 by: Jason Pruim
309631 by: David Harkness
309633 by: Richard Quadling
309635 by: David Harkness
309637 by: Steve Staples

Eclipse Manual
309620 by: Ethan Rosenberg
309625 by: Lester Caine

rewriteTextLinks.php - make URLs in plain text clickable
309634 by: Yermo
309636 by: Andre Polykanine

Administrivia:

To subscribe to the digest, e-mail:
php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
php-gene...@lists.php.net


--
---BeginMessage---
 perhaps you could just google wordpress pagination
 
 http://www.google.ca/#sclient=psyhl=enq=wordpress+paginationaq=1aqi=g4g-o1aql=oq=gs_rfai=pbx=1fp=88df74f51cdeec4c
 
 -- 
 
 Bastien
 
 Cat, the other other white meat
 

Here, this may help:
http://lmgt4u.com/?q=wordpress+pagination


Steve

---End Message---
---BeginMessage---
1)
Warning: getimagesize(./photos/HPR-130-260_HD-3070-1.jpg): failed to
open stream: No such file or directory in ... on line ...

ls ./photos/HPR-130-260_HD-3070-1.jpg
./photos/HPR-130-260_HD-3070-1.jpg

ls ./photos/HPR-130-260_HD-3070-1.jpg
./photos/HPR-130-260_HD-3070-1.jpg


2) Similarly...
Also trying
$cmd = 'cp '.$src.' '.$dst;
exec($cmd);

And some files failed to copy.  I assumed it was due to spaces in the
name, so I double quoted them.  For example:
cp: ./photos/Nozzle 130 Amp SS Alum 94-00994-06 220197.JPG: No such
file or directory

ls ./photos/Nozzle 130 Amp SS Alum 94-00994-06 220197.JPG FAILS THOUGH

cp ./photos/Nozzle\ 130\ Amp\ SS\ Alum\ 94-00994-06\ 220197.JPG ... ALSO FAILS

Help.
---End Message---
---BeginMessage---
On Mon, Nov 22, 2010 at 14:24, Dee Ayy dee@gmail.com wrote:
 1)
 Warning: getimagesize(./photos/HPR-130-260_HD-3070-1.jpg): failed to
 open stream: No such file or directory in ... on line ...

 ls ./photos/HPR-130-260_HD-3070-1.jpg
 ./photos/HPR-130-260_HD-3070-1.jpg

 ls ./photos/HPR-130-260_HD-3070-1.jpg
 ./photos/HPR-130-260_HD-3070-1.jpg


 2) Similarly...
 Also trying
 $cmd = 'cp '.$src.' '.$dst;
 exec($cmd);

 And some files failed to copy.  I assumed it was due to spaces in the
 name, so I double quoted them.  For example:
 cp: ./photos/Nozzle 130 Amp SS Alum 94-00994-06 220197.JPG: No such
 file or directory

 ls ./photos/Nozzle 130 Amp SS Alum 94-00994-06 220197.JPG FAILS THOUGH

 cp ./photos/Nozzle\ 130\ Amp\ SS\ Alum\ 94-00994-06\ 220197.JPG ... ALSO FAILS

 Help.

Well, I'm not the most brilliant man in the world, but it sounds -
based upon your very vague description - as though the file doesn't
exist.

-- 
/Daniel P. Brown
Dedicated Servers, Cloud and Cloud Hybrid Solutions, VPS, Hosting
(866-) 725-4321
http://www.parasane.net/
---End Message---
---BeginMessage---
On Mon, Nov 22, 2010 at 14:36, Dee Ayy dee@gmail.com wrote:
 Thes two lines means that they exist by using quoted and unquoted commands:
 ls ./photos/HPR-130-260_HD-3070-1.jpg
 ./photos/HPR-130-260_HD-3070-1.jpg

 ls ./photos/HPR-130-260_HD-3070-1.jpg
 ./photos/HPR-130-260_HD-3070-1.jpg

Please use Reply-All to reply back to the list.

Also, please note:

./photos/HPR-130-260_HD-3070-1.jpg != ./photos/Nozzle 130 Amp
SS Alum 94-00994-06 220197.JPG


-- 
/Daniel P. Brown
Dedicated Servers, Cloud and Cloud Hybrid Solutions, VPS, Hosting
(866-) 725-4321
http://www.parasane.net/
---End Message---
---BeginMessage---
There are 2 separate issues numbered 1) and 2).

#1 deals with getimagesize operating on definitely existing files
verified by ls.

#2 deals with escaping spaces in the name of the file and using the
exec command, which an example was given for a different file name
than in #1.
---End Message---
---BeginMessage---
On Mon, Nov 22, 2010 at 14:52, Dee Ayy dee@gmail.com wrote:
 There are 2 separate issues numbered 1) and 2).

 #1 deals with getimagesize operating on definitely existing files
 verified by ls.

 #2 deals with escaping spaces in the name of the file and using the
 exec command, which an example was given for a different file name
 than in #1.



php-general Digest 24 Nov 2010 05:33:44 -0000 Issue 7051

2010-11-23 Thread php-general-digest-help

php-general Digest 24 Nov 2010 05:33:44 - Issue 7051

Topics (messages 309638 through 309645):

is this thing on??
309638 by: Steve Staples
309639 by: Peter Lind
309640 by: Steve Staples
309641 by: Daniel Brown
309642 by: Daniel P. Brown
309643 by: Nicholas Kell

curl and variable parameters in hyperlink
309644 by: Bob Keightley
309645 by: admin.buskirkgraphics.com

Administrivia:

To subscribe to the digest, e-mail:
php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
php-gene...@lists.php.net


--
---BeginMessage---
tap tap tap... testing testing... 1, 2, 3

Hello?No activity since yesterday at like 6pm EST... am i not
getting messages, or has there not been any activity?

Just curious... carry on about your business... :P


Steve

---End Message---
---BeginMessage---
On 23 November 2010 20:52, Steve Staples sstap...@mnsi.net wrote:
 tap tap tap... testing testing... 1, 2, 3

 Hello?    No activity since yesterday at like 6pm EST... am i not
 getting messages, or has there not been any activity?

 Just curious... carry on about your business... :P


http://news.php.net/php.general - please, next time, don't spam tons of people.

-- 
hype
WWW: plphp.dk / plind.dk
LinkedIn: plind
BeWelcome/Couchsurfing: Fake51
Twitter: kafe15
/hype
---End Message---
---BeginMessage---
On Tue, 2010-11-23 at 20:55 +0100, Peter Lind wrote:
 On 23 November 2010 20:52, Steve Staples sstap...@mnsi.net wrote:
  tap tap tap... testing testing... 1, 2, 3
 
  Hello?No activity since yesterday at like 6pm EST... am i not
  getting messages, or has there not been any activity?
 
  Just curious... carry on about your business... :P
 
 
 http://news.php.net/php.general - please, next time, don't spam tons of 
 people.
 
 -- 
 hype
 WWW: plphp.dk / plind.dk
 LinkedIn: plind
 BeWelcome/Couchsurfing: Fake51
 Twitter: kafe15
 /hype
 

My apologies to you, and to everyone else on the list.

Peter,  I didn't know that page/site existed.  I will check there from
now on when there seems to be a lull in messages (usually seems to be at
least a few every day).

Steve.

---End Message---
---BeginMessage---
On Tue, Nov 23, 2010 at 14:55, Peter Lind peter.e.l...@gmail.com wrote:

 http://news.php.net/php.general - please, next time, don't spam tons of 
 people.

We've never really minded the occasional list-ping.  In fact, if
you check those same archives through the decade, you'll see that even
the most senior members of the list and community have done it from
time to time.  Though, while it's certainly not SPAM, it's good that
you pointed out the archives.  I'm afraid it seems that many folks
don't realize they're there.  Might be worthwhile to add it in to the
signature of each list message sometime in the future.

-- 
/Daniel P. Brown
Network Infrastructure Manager
Documentation, Webmaster Teams
http://www.php.net/
---End Message---
---BeginMessage---
On Tue, Nov 23, 2010 at 14:52, Steve Staples sstap...@mnsi.net wrote:
 tap tap tap... testing testing... 1, 2, 3

 Hello?    No activity since yesterday at like 6pm EST... am i not
 getting messages, or has there not been any activity?

 Just curious... carry on about your business... :P

Some of the lull is likely due in part to the American
Thanksgiving holiday this week.  Historically, the list has always
calmed down over the years during major holidays or events in North
America, the UK, and Northern Europe.

-- 
/Daniel P. Brown
Dedicated Servers, Cloud and Cloud Hybrid Solutions, VPS, Hosting
(866-) 725-4321
http://www.parasane.net/
---End Message---
---BeginMessage---

Whitetail hunting season, for most of the American Midwest anyway.  :)


On Nov 23, 2010, at 2:01 PM, Steve Staples wrote:

 On Tue, 2010-11-23 at 20:55 +0100, Peter Lind wrote:
 On 23 November 2010 20:52, Steve Staples sstap...@mnsi.net wrote:
 tap tap tap... testing testing... 1, 2, 3
 
 Hello?No activity since yesterday at like 6pm EST... am i not
 getting messages, or has there not been any activity?
 
 Just curious... carry on about your business... :P
 
 
 http://news.php.net/php.general - please, next time, don't spam tons of 
 people.
 
 -- 
 hype
 WWW: plphp.dk / plind.dk
 LinkedIn: plind
 BeWelcome/Couchsurfing: Fake51
 Twitter: kafe15
 /hype
 
 
 My apologies to you, and to everyone else on the list.
 
 Peter,  I didn't know that page/site existed.  I will check there from
 now on when there seems to be a lull in messages (usually seems to be at
 least a few every day).
 
 Steve.
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

---End Message---
---BeginMessage---
First use of Curl so probably a very simple problem - I have a script which 
loads a 

Re: [PHP] Procedural Autoloader?

2010-11-23 Thread Steve Staples
On Mon, 2010-11-22 at 15:26 -0800, David Harkness wrote:
 On Mon, Nov 22, 2010 at 3:05 PM, Richard Quadling rquadl...@gmail.comwrote:
 
  Would it be overboard to use a namespace? Aren't namespaces handled by
  the autoloader? If not autoload(), how about spl_autoloading?
 
 
 Autoloading is for determining the path and filename where a named item is
 defined. Namespaces only give you the path. Even with namespaces, you'd
 still need to require the files that contain the functions. Plus you'd also
 need to use the namespace everywhere you use the function because you cannot
 alias functions--only classes. :(
 
 David

can I maybe make a suggestion?   If I have been following this
correctly, it seems as if the OP has a bunch of non specific class
functions, that he doesn't want in 1 big gigantic file, and include that
one huge file ALL the time...   what if the OP put some naming
conventions into the function names, and then did some kind of error
trapping on the function calls, and if the function does not exist (yet)
then call some other function to rip apart the name of the function that
was called, and then include that file?   I am just offering some kind
of hypothetical solution, and off the top of my head can't think exactly
how it could be accomplished.

you could always wrap all your non class/custom functions in a
function...


function checkFunction($file, $function, $args)
{
  $filename = ./function_{$file}.php;
  if(file_exists($filename))
  {
include_once($filename);
  }
  else
  {
return 'function file not exist';
  }

  if(function_exists($file .'_'. $function))
  {
return call_user_func_array($file .'_'. $function, $args);
  }
  else
  {
return Function: {$function}() does not exist;
  }

  return 'Fire and brimstone coming down from the skies! Rivers and seas
boiling! Forty years of darkness! Earthquakes, volcanoes... The dead
rising from the grave! Human sacrifice, dogs and cats living together...
mass hysteria!!';
}

$temp = checkFunction('test', 'somefunction', array('var1', 'var2'));

then create the functions file- functions_test.php that holds all the
functions you would group together... 

function test_somefunction($var1, $var2, $var3 = '')
{
return $var1 .' - '. $var2;
}


This is just a thought, and yeah, it would require some rewrites, and
some forward thinking...  but could solve your issue... maybe

steve


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] is this thing on??

2010-11-23 Thread Steve Staples
tap tap tap... testing testing... 1, 2, 3

Hello?No activity since yesterday at like 6pm EST... am i not
getting messages, or has there not been any activity?

Just curious... carry on about your business... :P


Steve


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] is this thing on??

2010-11-23 Thread Peter Lind
On 23 November 2010 20:52, Steve Staples sstap...@mnsi.net wrote:
 tap tap tap... testing testing... 1, 2, 3

 Hello?    No activity since yesterday at like 6pm EST... am i not
 getting messages, or has there not been any activity?

 Just curious... carry on about your business... :P


http://news.php.net/php.general - please, next time, don't spam tons of people.

-- 
hype
WWW: plphp.dk / plind.dk
LinkedIn: plind
BeWelcome/Couchsurfing: Fake51
Twitter: kafe15
/hype

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] is this thing on??

2010-11-23 Thread Steve Staples
On Tue, 2010-11-23 at 20:55 +0100, Peter Lind wrote:
 On 23 November 2010 20:52, Steve Staples sstap...@mnsi.net wrote:
  tap tap tap... testing testing... 1, 2, 3
 
  Hello?No activity since yesterday at like 6pm EST... am i not
  getting messages, or has there not been any activity?
 
  Just curious... carry on about your business... :P
 
 
 http://news.php.net/php.general - please, next time, don't spam tons of 
 people.
 
 -- 
 hype
 WWW: plphp.dk / plind.dk
 LinkedIn: plind
 BeWelcome/Couchsurfing: Fake51
 Twitter: kafe15
 /hype
 

My apologies to you, and to everyone else on the list.

Peter,  I didn't know that page/site existed.  I will check there from
now on when there seems to be a lull in messages (usually seems to be at
least a few every day).

Steve.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] is this thing on??

2010-11-23 Thread Daniel Brown
On Tue, Nov 23, 2010 at 14:55, Peter Lind peter.e.l...@gmail.com wrote:

 http://news.php.net/php.general - please, next time, don't spam tons of 
 people.

We've never really minded the occasional list-ping.  In fact, if
you check those same archives through the decade, you'll see that even
the most senior members of the list and community have done it from
time to time.  Though, while it's certainly not SPAM, it's good that
you pointed out the archives.  I'm afraid it seems that many folks
don't realize they're there.  Might be worthwhile to add it in to the
signature of each list message sometime in the future.

-- 
/Daniel P. Brown
Network Infrastructure Manager
Documentation, Webmaster Teams
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] is this thing on??

2010-11-23 Thread Daniel P. Brown
On Tue, Nov 23, 2010 at 14:52, Steve Staples sstap...@mnsi.net wrote:
 tap tap tap... testing testing... 1, 2, 3

 Hello?    No activity since yesterday at like 6pm EST... am i not
 getting messages, or has there not been any activity?

 Just curious... carry on about your business... :P

Some of the lull is likely due in part to the American
Thanksgiving holiday this week.  Historically, the list has always
calmed down over the years during major holidays or events in North
America, the UK, and Northern Europe.

-- 
/Daniel P. Brown
Dedicated Servers, Cloud and Cloud Hybrid Solutions, VPS, Hosting
(866-) 725-4321
http://www.parasane.net/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] is this thing on??

2010-11-23 Thread Nicholas Kell

Whitetail hunting season, for most of the American Midwest anyway.  :)


On Nov 23, 2010, at 2:01 PM, Steve Staples wrote:

 On Tue, 2010-11-23 at 20:55 +0100, Peter Lind wrote:
 On 23 November 2010 20:52, Steve Staples sstap...@mnsi.net wrote:
 tap tap tap... testing testing... 1, 2, 3
 
 Hello?No activity since yesterday at like 6pm EST... am i not
 getting messages, or has there not been any activity?
 
 Just curious... carry on about your business... :P
 
 
 http://news.php.net/php.general - please, next time, don't spam tons of 
 people.
 
 -- 
 hype
 WWW: plphp.dk / plind.dk
 LinkedIn: plind
 BeWelcome/Couchsurfing: Fake51
 Twitter: kafe15
 /hype
 
 
 My apologies to you, and to everyone else on the list.
 
 Peter,  I didn't know that page/site existed.  I will check there from
 now on when there seems to be a lull in messages (usually seems to be at
 least a few every day).
 
 Steve.
 
 
 -- 
 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] curl and variable parameters in hyperlink

2010-11-23 Thread Bob Keightley
First use of Curl so probably a very simple problem - I have a script which 
loads a third party web page into my site.  That page contains links which 
have variable parameters i.e. www.blahblah.asp?param1=xxxparam2=yyy.

Any clues as to what I need to do to pass these parameters in a curl script 
appreciated. 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] curl and variable parameters in hyperlink

2010-11-23 Thread admin
Depending on how the website is setup you can curl or soap parameters.

http://www.php.net/manual/en/book.curl.php
http://www.php.net/manual/en/book.soap.php




Richard L. Buskirk

-Original Message-
From: Bob Keightley [mailto:bob.keight...@virgin.net] 
Sent: Tuesday, November 23, 2010 9:12 PM
To: php-general@lists.php.net
Subject: [PHP] curl and variable parameters in hyperlink

First use of Curl so probably a very simple problem - I have a script which 
loads a third party web page into my site.  That page contains links which 
have variable parameters i.e. www.blahblah.asp?param1=xxxparam2=yyy.

Any clues as to what I need to do to pass these parameters in a curl script 
appreciated. 



-- 
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



RE: [PHP] curl and variable parameters in hyperlink

2010-11-23 Thread Bob Keightley

I already have a curl script that gets the web page, but it doesn't pass the
parameters

Being new to PHP I haven't the first idea how to modify it so that it does.

Script is as follows:

$url = http://www.xx.com/query.asp?param1=val1param2=val2;;

foreach ($_POST as $key=$post) {
$post=str_replace( , +, $post);
$url.=$key.=.$post.;
}

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);
$data = curl_exec($ch);
curl_close($ch);

$data=str_replace('.asp', '.php', $data);
echo $data;

This returns the web page, but ignores val1 and val2 which are necessary to
execute the query.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php