$content = "... a bunch of text with some protected
information with some more text with some more
more protected
text and even some
protected content>b>";
I want to replace any content between these tags:
with say
$replacewith = "protected content";
$content = " a bunch of text with so
see this
http://www.phpclasses.org/browse/package/4282.html
2009/12/28 robert mena :
> Hi,
>
> I need to develop an interface that will, for example, ping IPs from a
> remote server. So the php script will be hosted in a server with ssh access
> (key) to the remote server.
>
> I can make it work f
try http://www.php.net/manual/en/function.preg-replace-callback.php.
you need to read a bit on 'regular expressions'
http://www.gskinner.com/RegExr/ will be handy in crafting a suitable
regex to capture your 'tags'
~viraj
On Thu, Jan 7, 2010 at 2:16 PM, John Taylor-Johnston
wrote:
>
> $content
Great. Ok. Thanks. [I'm a top quoter)]. I'll look at it.
This was my dirty way of hacking it:
if (($current_user->id == 0) && ($user_ID == 0))
{
$content = str_replace('', 'Protected ', '--> Content href="/wp-login.php">[Log in here]', $content);
}
Cheap & Dirty and need refinement :p
viraj w
I have a singleton database object in a global file at the top of my
document. In most other locations I am able to access it just fine, however
in my footer I want to loop through a properties list for links (I am saving
links to a database, each with its own properties).
Here is the code snippet
Do you have a method in your Database class called affected_rows() ?
>From the code you have shown you only have a member variable called
affected_rows and so your call $db->fetch_array($result) is falling
over.
On Thu, Jan 7, 2010 at 8:47 AM, Allen McCabe wrote:
> I have a singleton database obj
Mattias Thorslund wrote:
> Hi,
>
> I wonder if anyone has experience with running PHP on the Resin server.
> Opinions, good, bad? Gotchas? Similar projects?
>
> http://www.caucho.com/projects/resin/
>
> Thanks,
>
> Mattias
Resin is excellent - especially if you need to integrate in with java
a
Rick Dwyer wrote:
> Hello List.
> I have been playing around with PHP, running a few tutorials and I came
> across an error message I could not resolve.
>
> The tutorial is Generating One Time URL's by Oreilly:
> http://www.oreillynet.com/pub/a/php/2002/12/05/one_time_URLs.html
>
> Basically the
Allen McCabe wrote:
I have a singleton database object in a global file at the top of my
document. In most other locations I am able to access it just fine, however
in my footer I want to loop through a properties list for links (I am saving
links to a database, each with its own properties).
He
On Thu, Jan 7, 2010 at 04:11, Daevid Vincent wrote:
> I think it's a case by case basis. Generally File I/O is expensive, but
> then again, as you say, having everything in a couple files is also
> sub-optimal for organizing and keeping things modular.
That is easily sorted out using automated bu
On Thu, 2010-01-07 at 16:50 +1030, James McLean wrote:
> On Thu, Jan 7, 2010 at 1:35 PM, Vernon Webb wrote:
> > I move a number of sites from one server to another and one the one server
> > we had php4 and now we have php5 and since then my server seems to hang
> > every time there is a header
On Thu, 2010-01-07 at 09:19 +, Nathan Rixham wrote:
> Rick Dwyer wrote:
> > Hello List.
> > I have been playing around with PHP, running a few tutorials and I came
> > across an error message I could not resolve.
> >
> > The tutorial is Generating One Time URL's by Oreilly:
> > http://www.ore
Thanks Ashley & Nathan.
As it turns out, there is more than one "tmp" folder... and I was
looking in the wrong one. When I SSH'd in the correct one, I created
the missing file and it began to work properly.
Thanks for chiming in.
--Rick
On Jan 7, 2010, at 7:58 AM, Ashley Sheridan wrote:
On Thu, 2010-01-07 at 08:32 -0500, Rick Dwyer wrote:
> Thanks Ashley & Nathan.
>
> As it turns out, there is more than one "tmp" folder... and I was
> looking in the wrong one. When I SSH'd in the correct one, I created
> the missing file and it began to work properly.
> Thanks for chiming i
That's the odd thing, there is nothing being indicated in the error logs the
server just hangs and I have to restart apache in order to get the site back
up. First I thought it might be the server so I move over to a different
server, but I still have the same issue. What I feel is really odd is
On Thu, 2010-01-07 at 08:40 -0500, Vernon Webb wrote:
> That's the odd thing, there is nothing being indicated in the error logs the
> server just hangs and I have to restart apache in order to get the site back
> up. First I thought it might be the server so I move over to a different
> server
Didn't know there were php logs, I thought they would be included in the Apache
logs, where do I find the php logs?
~V
From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk]
Sent: Thu 1/7/2010 8:42 AM
To: Vernon Webb
Cc: php-general@lists.php.net
Subject: RE:
On Thu, 2010-01-07 at 08:57 -0500, Vernon Webb wrote:
> Didn't know there were php logs, I thought they would be included in the
> Apache logs, where do I find the php logs?
>
> ~V
>
>
>
> From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk]
> Sent: Thu 1/
I caught that error, but the line number was referring to the assignment, it
didn't even get to the obvious error.
Why would $total = $db->affected_rows, (assigning the value of
$affected_rows to $total) be interpreted as a method call?
I have since defined a num_rows() method (using mysql_num_r
Ashley Sheridan wrote:
> On Thu, 2010-01-07 at 08:32 -0500, Rick Dwyer wrote:
>
>> Thanks Ashley & Nathan.
>>
>> As it turns out, there is more than one "tmp" folder... and I was
>> looking in the wrong one. When I SSH'd in the correct one, I created
>> the missing file and it began to work p
Hi,
I am working with an XML document and have a SimpleXML object whose var_dump
looks like this:
---
object(SimpleXMLElement)#2 (10) {
["@attributes"]=>
array(1) {
["id"]=>
string(7) "3854857"
}
["type"]=>
string(7) "Article"
["createDate"]=>
string(25) "2006-09-06T16:42:2
On Thu, Jan 7, 2010 at 6:56 PM, Mari Masuda wrote:
> Hi,
>
> I am working with an XML document and have a SimpleXML object whose var_dump
> looks like this:
>
> ---
> object(SimpleXMLElement)#2 (10) {
> ["@attributes"]=>
> array(1) {
> ["id"]=>
> string(7) "3854857"
> }
> ["type"]=>
>
On Jan 7, 2010, at 2:31 PM, Jonathan Tapicer wrote:
> On Thu, Jan 7, 2010 at 6:56 PM, Mari Masuda wrote:
>> Hi,
>>
>> I am working with an XML document and have a SimpleXML object whose var_dump
>> looks like this:
>>
>> ---
>> object(SimpleXMLElement)#2 (10) {
>> ["@attributes"]=>
>> array
On Wed, 6 Jan 2010 19:11:07 -0800, dae...@daevid.com ("Daevid Vincent") wrote:
>
>
>> -Original Message-
>> From: Al [mailto:n...@ridersite.org]
>> Sent: Wednesday, January 06, 2010 5:09 PM
>> To: php-general@lists.php.net
>> Subject: [PHP] Re: PHP programming strategy; lots of little
>
On Wed, 06 Jan 2010 23:20:26 -0500, kolb0...@umn.edu (Daniel Kolbo) wrote:
>Daevid Vincent wrote:
>>
>>
>>> -Original Message-
>>> From: Al [mailto:n...@ridersite.org]
>>> Sent: Wednesday, January 06, 2010 5:09 PM
>>> To: php-general@lists.php.net
>>> Subject: [PHP] Re: PHP programming
It's the oddest thing. I've found the logs but there is no error at all, the
server just hangs and the only way to get it back is to restart Apache.
From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk]
Sent: Thu 1/7/2010 9:04 AM
To: Vernon Webb
Cc: php-gene
clanc...@cybec.com.au wrote:
Thank you all for your comments. I did not know about bytecode caches. They're
an
interesting concept, but if I am interpreting the paper
http://itst.net/654-php-on-fire-three-opcode-caches-compared correctly they
only double
the average speed of operation, which is
On Thu, 07 Jan 2010 22:48:59 -0500, rob...@interjinn.com (Robert Cummings)
wrote:
>clanc...@cybec.com.au wrote:
>> Thank you all for your comments. I did not know about bytecode caches.
>> They're an
>> interesting concept, but if I am interpreting the paper
>> http://itst.net/654-php-on-fire-th
28 matches
Mail list logo