php-general Digest 1 Jun 2008 12:53:09 -0000 Issue 5491

Topics (messages 274902 through 274907):

Re: Update does not work...but no errors either
        274902 by: Ryan S

Anybody got a little spare time to help me out with a little OOP
        274903 by: Ryan S
        274905 by: Jim Lucas

saving outside website content via php...
        274904 by: blackwater dev

php5.2.4 and apache2.0.63 on WinXp
        274906 by: Ramses
        274907 by: zerof

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---
Hey DB,
Thanks for replying, I did solve it though.... was running a lot of tests and 
checking a lot of stuff with the fill before i finally added the database 
stuff... but forgot to include() the connection file :)

Thanks for writing though!
Cheers!
R



      

--- End Message ---
--- Begin Message ---
coz i suck at OOP!

Hey!

Am trying to modify a wordpress plugin file,the name of the plugin is POST 
TEASER and can be downloaded from here 
http://wordpress.org/extend/plugins/post-teaser/, it works as advertised and 
this is what it does:

I specify for
example 4 words before the page should be "cut",  it first breaks the
page down into blocks based on the <p> and </p> tags

example
<p> this will be block 1</p>
<p> this will be block 2</p>
<p> this will be block 3</p>
etc

then
it counts the words in block 1, if its equal to the number of words i
specified.. it returns the whole block if not it returns block1 and
block 2 etc...

What i am trying to make it do is... if i specify 3 workds it returns EXACTLY 3 
words like so:
"This will be.... read more inside!"
 

I have written the code to get the above output... but being a total dumbo at 
OOP i dont know where to 'insert' the code.
here is the code I have come up with:

================================== Start code 
============================================
$sample_string="From http://www.ezee.se/ The UK police are by far one of the 
most open to being greedy and corrupted by their afore mentioned greed, case 
and point: the hundreds of extra speed cameras that are put in place with an 
idea of making more money rather than public safety, cameras that get fines 
that are around 100 million pounds per year! Heres one example..";

$words=explode(" ", $sample_string);
$no_to_display=12;

for($i =0; $i < $no_to_display; $i++)     
{$make_string_again .= $words[$i]." ";} 

echo $make_string_again."... read more inside!";

==================================== end code 
===========================================

Have upped the file here if you want to give it a shot.... the script is pretty 
well self documented too via comments in the script.


Thanks in advance,
Ryan

------
- The faulty interface lies between the chair and the keyboard.
- Creativity is great, but plagiarism is faster!
- Smile, everyone loves a moron. :-)



      

--- End Message ---
--- Begin Message ---
Ryan S wrote:
coz i suck at OOP!

Hey!

Am trying to modify a wordpress plugin file,the name of the plugin is POST 
TEASER and can be downloaded from here 
http://wordpress.org/extend/plugins/post-teaser/, it works as advertised and 
this is what it does:

I specify for
example 4 words before the page should be "cut",  it first breaks the
page down into blocks based on the <p> and </p> tags

example
<p> this will be block 1</p>
<p> this will be block 2</p>
<p> this will be block 3</p>
etc

then
it counts the words in block 1, if its equal to the number of words i
specified.. it returns the whole block if not it returns block1 and
block 2 etc...

What i am trying to make it do is... if i specify 3 workds it returns EXACTLY 3 words like so:
"This will be.... read more inside!"
I have written the code to get the above output... but being a total dumbo at 
OOP i dont know where to 'insert' the code.
here is the code I have come up with:

================================== Start code 
============================================
$sample_string="From http://www.ezee.se/ The UK police are by far one of the most 
open to being greedy and corrupted by their afore mentioned greed, case and point: the 
hundreds of extra speed cameras that are put in place with an idea of making more money 
rather than public safety, cameras that get fines that are around 100 million pounds per 
year! Heres one example..";

$words=explode(" ", $sample_string);
$no_to_display=12;

for($i =0; $i < $no_to_display; $i++) {$make_string_again .= $words[$i]." ";}
echo $make_string_again."... read more inside!";


Here would be my incarnation of this script

<?php

$sample_string="From http://www.ezee.se/ The UK police are by far one of the most open to being greedy and corrupted by their afore mentioned greed, case and point: the hundreds of extra speed cameras that are put in place with an idea of making more money rather than public safety, cameras that get fines that are around 100 million pounds per year! Heres one example..";

$break = 12;

$words=explode(" ", $sample_string, $break);

$words[($break-1)] = "... read more inside!";

echo join(' ', $words);

?>



==================================== end code 
===========================================

Have upped the file here if you want to give it a shot.... the script is pretty 
well self documented too via comments in the script.


Thanks in advance,
Ryan

------
- The faulty interface lies between the chair and the keyboard.
- Creativity is great, but plagiarism is faster!
- Smile, everyone loves a moron. :-)





--- End Message ---
--- Begin Message ---
I'm using the google api to allow people to search the web via my site.  The
pages are simply iframed within my site.  Is it possible for me to give them
a 'save' button and let them save the page they are viewing in it's current
state?  I don't mean save to their computer but I would use php to save it
to disk or the db.  How can I do this and pull in all the css, images, etc?



Thanks!

--- End Message ---
--- Begin Message ---
Hello,

I found this address somewhere on the php.net site indicating I should send my questions to this email.

I am trying to get php and apache to work together.  it's a new install.

I installed apache2.0.63 first and tested localhost : it worked fine
I then installed php5.2.4 in c:\PHP\

I adjusted - after some internetsearches -  the httpd.conf to :

#BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
LoadModule php5_module "C:\PHP\php5apache2_2.dll"
PHPIniDir "C:\PHP\"
ScriptAlias /php/ "c:/php/"
AddType application/x-httpd-php .php .php3 .phps
Action application/x-httpd-php "/php/php.exe"

After relaunching apache i keep getting the message :
CANNOT load c:/PHP/php5apache2_2.dll. the specified module could not be found.

PS : I've set my environmental variables : PHPRC to c:\PHP\
And my path does contain ; c:\PHP\


Anyone can help me?

kind regards,

Ramses



--- End Message ---
--- Begin Message ---
Ramses escreveu:
Hello,

I found this address somewhere on the php.net site indicating I should send my questions to this email.

I am trying to get php and apache to work together.  it's a new install.

I installed apache2.0.63 first and tested localhost : it worked fine
I then installed php5.2.4 in c:\PHP\

I adjusted - after some internetsearches -  the httpd.conf to :

#BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
LoadModule php5_module "C:\PHP\php5apache2_2.dll"
PHPIniDir "C:\PHP\"
ScriptAlias /php/ "c:/php/"
AddType application/x-httpd-php .php .php3 .phps
Action application/x-httpd-php "/php/php.exe"

After relaunching apache i keep getting the message :
CANNOT load c:/PHP/php5apache2_2.dll. the specified module could not be found.

PS : I've set my environmental variables : PHPRC to c:\PHP\
And my path does contain ; c:\PHP\


Anyone can help me?

kind regards,

Ramses


---
Try these links.
(With non-traditional settings, however, easier to configure)
http://www.educar.pro.br/i_en/apache/v20/
http://www.educar.pro.br/i_en/php/v5/
http://www.educar.pro.br/i_en/mysql/v50/
--
zerof
http://www.educar.pro.br/
Apache - PHP - MySQL - Boolean Logics - Project Management
----------------------------------------------------------
Você deve, sempre, consultar uma segunda opinião!
----------------------------------------------------------
Deixe todos saberem se esta informação foi-lhe útil.
----------------------------------------------------------      
You must hear, always, one second opinion! In all cases.
----------------------------------------------------------
Let the people know if this info was useful for you!
----------------------------------------------------------

--- End Message ---

Reply via email to