I have quite a strange problem with PHP and Apache on my local testing server. For some reason it keeps stopping sending headers to the browser (I am pretty sure that is the problem anyway).
It's not a case of the old 'output already sent' as it was working fine, had the problem, went away after I reinstalled Apache and is now back aga...
Hi, I have created my own sessions and now want to time out inactive users. The thing is I have got it to work.. kind of... after the session timeout has passed, when i click on another page, it does nothing, but then when i click on something again it times out as supposed to. Heres my code
if(preg_match("#^" . DOMAIN_SSL . ".*#is", $_...
I have an installation of XAMPP and an application built on Zend Framework that works in a normal apache2 + php5 environment. The application resides inside a vhost correctly configured and as a precaution I also added .phtml files to match php compiler
<FilesMatch "\.php$|\.php5$|\.php4$|\.php3$|\.phtml$|\.phpt$">
SetHandler appli...
I am new to Netbeans. Is it possible to work directly on the server files through sftp to avoid downloading/uploading each time. Will the intelisense work the same ?
If it is possible I can't find how to do that or what plug-in i need to use. And if it isn't what other free php IDE offers this option ?
...
So, I figured out how to get an access token from Google using the Zend_Oauth library in 1.10. Now lets say I want to get my contacts...
$config = array(
'consumerKey' => 'zzz',
'signatureMethod' => 'HMAC-SHA1',
'consumerSecret' => 'xxx'
);
$token = unserialize($_SESSION['GOOGLE_ACCESS_TOKEN']);
$client = $token->ge...
Is it a good practice to unset the variables that you used in a class? Or its an optional? If its a good practice what is the benefit of using the unset function? Thank you.
...
$this->getResponse()->addCacheControlHttpHeader('private=True');
What's that for,how does it work?
...
Right now, I have blog posts being generated as nodes in my main content area. In my content block there's only one block and that's for the blog navigation which needs to be on top of the blog posts and it has very custom markup - how could I reverse the order? I'm not sure where to move the posts down.
Clarification: I need my block t...
Here is the code :
function dosomething ()
{
... do something with the array... like print value !
}
$ar = array(1,2,3);
dosomething ($ar);
That piece of code work fine...
What i try to do is to pass the array DIRECTLY to the function
i have try this, non work... HELP !
dosomething ([12,32,56]);
dosomething ({12,45,87});
dosomet...
Hi All,
i want the content inside of the "img" tag from the string.
for ex:- if
str="< img src="/files/thumbnails/001.simonhiggins_comm games_thumb.jpg" title="Commonwealth Games" alt="showreel" class="clear-right-margin" />"
then i want to o/p using preg_split as follows:-
src="/files/thumbnails/001.simonhiggins_comm games_thumb.jpg...
I've been dabbling in writing a PHP Class for a few weeks now and I like to think I've got a handle on he basics but I'm a little stumped.
As a simplified example of what I'm doing:
I have declared and instantiated a public variable ($myURL) in my class (someClass) and in a external file (config.php) to the class filled the variable wi...
I could swear this was working yesterday. Now however the code below destroys the folder with no problem but creates a new folder with 411 permissions when it should be 777. My code was doing this yesterday.
The purpose of this is to zip up a folder, deliver it, delete the images, then create a new directory for the images.
Can someo...
Can anyone give me an example of querying a Pervasive PSQL database from PHP on a remote Linux machine?
Pervasive claims PHP can access it, but their examples use Windows COM objects, which isn't available on Linux, and the first "PHP DTO Extensions 1" link they have for download actually links to a bunch of ASP .NET scripts, and isn't...
Extract function of php adds variables to the local scope of the calling function. How can we write our own php function extract which does the same?
...
Hello
I'm uploading image file to storage server. Before uploading I should compose filename, which contains AUTOINCREMENT VALUE in it (for example, 12345_filename.jpg).
How could I get autoincrement value before inserting into DB?
I see only one solution
insert empty row
get it's autoincrement value
delete this row
insert row with ...
Hi there. My first question here, after enjoying lots og other peoples questions and answers. Thanks for that :)
Im trying to work with vimeo's api, and im getting a response I can't figure out to use as I intend. I think its simple for some of you guys, but can't wrap my head around it.
I got a bunch of video id's that I need to get t...
I am using MySQL fulltext and PHP (codeigniter) to search a database containing RSS items. Problem is some of these items's titles use underscores instead of spaces. Since MySQL considers underscores as part of a word, these items will never be matched in the search, unless the user types the exact title including underscores.
Server is...
add in note
i have to paste 3 time the following code in the html body of a static webpage, instead of having to paste it and have a lot of code, i prefer to only have one line (3 times) that call the writing of the code, like this : <?php getgooglepub(); ?>
I like to make a php function that will ouput to the hmtl page the google ana...
Hello,
I am have a table that shows the user suggestions that they have recieved on clicking read more some ajax is fired and in the database the suggestion is marked as read. Currently if the suggestion is new I show a closed envelope, if it is read I show an open envelope, however I can get it to reload the table when the user clicks...
In PHP, can I specify an interface to have fields, or are PHP interfaces limited to functions?
<?php
interface IFoo
{
public $field;
public function DoSomething();
public function DoSomethingElse();
}
?>
If not, I realize I can expose a getter as a function in the interface:
public GetField();
...