This is what I have:
$observer = $this->getMock('SomeObserverClass', array('method'));
$observer->expects($this->once())
->method('method')
->with($this->equalTo($arg1));
But the method should take two parameters. I am only testing that the first parameter is being passed correctly (as $arg1).
How do test the second...
i’m trying to create a url string that works like this:
/app/process/example.com/index.html
so in other words,
/app/process/$URL
i then retrieve the url with
$this->uri->segment(3);
the forward slashes in the URL will of course be a problem accessing uri segments, so i’ll go ahead and url encode the URL portion:
/app/process/e...
I've been doing html, css and javascript for quite a long time, mostly for my very own enjoyment. I would say I know fairly much, I've created many simple games and apps and experiments with javascript. However there is only so much that is possible to do in the browser, for any more "complete" websites I am constantly confronted with my...
Hi I have a JSON object that is a 2-dimentional array and I need to pass it to PHP using Ajax.Request (only way I know how). ...Right now I manually serialized my array using a js function...and get the data in this format: s[]=1&d[]=3&[]=4 etc. ....
my question is: Is there a way to pass the JSON object more directly/efficientely?..ins...
Help with using the xapian php wrapper.
I have a couple of custom exception handlers for different categories of errors (I'm thinking of seperating them out more).
Xapian handles errors by throwing standard Exception objects.
I would like to use a custom exception handler for these though. How do I go about using a custom exception for...
I have been trying to find information on how to retrieve attachments from a gmail account in either python or PHP, I'm hoping that someone here can be of some help, thanks.
Related:
How can I download all emails with attachments from Gmail?
...
I'm not good at programming and my trying to open one of my spreadsheet documents.
Below in the basic login im using, I then request a list all my spreadsheet, which is returned in $feed.
And now I'm worried I'm not on the right track with opening a document so I can read and write cells.
<?php
require_once '../library/Zend/Loader.php...
I have a client with a LAMP website serving mostly video. He is currently on one server with all components. He is having some scaling problems. What are some of the techniques that can be used to help.
I used separating out the DB to another server with a GB Ethernet between it and the webserver. Maybe adding more web servers with some...
This happens repeatedly and is very annoying. I upload some PHP code to a client's server. A few weeks pass. They ask for a change to be made and I re-download the code as they've made some changes. However, my code which used to be neat and tidy the last time I looked at it now has an extra lines of whitespace added everywhere. So now w...
As I think most people know already, or if you don't, FPDF released a new version, 1.6 this past August after almost 4 years without a release. I'm wondering if anyone has had any problems upgrading from 1.53 to 1.6?
...
I have a very simple model. I want to add a send email routine to on of the methods for the model:
$this->Email->delivery = 'smtp';
$this->Email->template = 'default';
$this->Email->sendAs = 'text';
$this->Email->from = 'email';
$this->Email->to = 'email';
$this->Email->subject = 'Error';
I've tried putting
App::import(...
How do I actually run a file on localhost?
I know it is working, but how do I run a file on it, and how do I verify that the file is in fact running on localhost?
Server newbie here, additional questions (I have xampp running Apache 2.2):
From your responses it sounds like I have to type in the path in the browser in order to open the f...
I have configured a simple LAMP stack on Debian and I am experiencing some problems with the Apache web server.
Each 3-4 hours the web server is entering a deadlock and all the requests that hit the database block. The server is creating a new child for each request. The number of processes increases very quickly. After a few seconds M...
Hey having some trouble trying to maintain transparency on a png when i create a thumbnail from it, anyone any experience with this? any help would be great, here's what i am currently doing:
$fileName= "../js/ajaxupload/tees/".$fileName;
list($width, $height) = getimagesize($fileName);
$newwidth = 257;
$newheight = 197;
$thumb = ima...
I'm developing a web app for an Apache shared hosting server. I have already written some code in Perl but I recently found out, to my surprise, the shared hosting provider does not provided mod_perl or a way to install it.
I have been a bit worried that running a Perl web app through CGI without mod_perl would make it very slow? Shou...
I am running into a very strange issue with PHP 5.2.6 w/ IIS on Windows XP (have tried both CGI and ISAPI). I am running a fresh installation with the default php.ini settings.
First, assume the following (ugly, but effective) HTML code:
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
<input type="hidden" name="test1...
When editing PHP code (I'm not sure if it's specific to that language) and I create a new line in the middle of comma-separated lists that span multiple lines, the indent rules always unindent the line I'm leaving. Here's a video of it. This happens in arrays, function argument lists, etc.
Is there anything I can do to stop this from ha...
I'm a complete beginner when it comes to programming. I'm taking a stab at PHP, and have seen how powerful the frameworks can be. But should I even consider trying to work with a framework until I have a strong grasp of PHP itself?
Note: I'd most likely be using CodeIgnitor, but the question applies to any of the frameworks.
...
hi i forgot the code which in a sample class you have to add so that it runs automatically?
is it wakeup or something?
like so:
class something {
function automaticxxx_something_which_runs when class is created()
{
}
}
$s = new something();
-what do i create in the class file so that something runs already after the class is ini...
Thanks to everyone here, got the Xampp server running!!! and can run my html in subdirectories now, as well. (can't have spaces in the subdirectory names)
NEXT UP - SSI Includes or PHP Includes
Xampp says SSI is deactivated. Tried uncommenting the lines for includes, but it doesn't change the deactivation.
How do I activate SSI?
Then...