I am trying to create a webservice using the PHP Soap extension and I am having problems with the .wsdl. Is there an easy way to generate 2.0 wsdl's? Where is a good site (or book) that I can look to in order to determine how to build the WSDL? I have no problem getting my soap client to retrieve soap messages from other web services so ...
Alright another tough question for you guys to answer. I know I don't make them easy or common. My problem comes in when a user clicks on My Cart while they are already logged in. It some how resets the sessions and logs them out/empties their cart. I also get a fatal error telling me the notify function is not accessible under the o...
Bit of a strange problem here...
I've got an update query that isn't working, and I can't for the life of me work out why!
My table has two three fields - 'id' (int, auto increment), 'date' (date), and 'amountraised' (decimal). Part of the app I'm developing calculates the fundraising total each week made by a charity bookstall. The 'd...
Now I have an model User which represents an user in the application. And I use an UserRepository with methods like getById($id) and getAll().
An user can post reviews. If I want to show the 5 or 10 or maybe 20 last reviews of an user it's most logical to ask the user I think. So I would have a method $user->getLastReviews(5).
But wha...
I am developing a script in PHP for uploading files to a MySQL database. There various things that need to selected in addition to the actual file that go into the database entry. The script needs to be designed so that it checks to make sure all of the proper selections have been made, and if they are not the script returns to the upl...
I have a feeling that Apache is using a different php.ini file that the one I am editing. I make a change in my php.ini file, restart Apache, and the change doesn't take affect. So I don't know what to do anymore.
Any ideas?
Update: Found out it's using the right php.ini file...but I still don't know what to do!
...
I'm trying to consume a hello world AXIS2 SOAP web service using a PHP client. The Java class is written in Netbeans and the AXIS2 aar file is generated using the Netbeans AXIS2 plugin.
You've all seen it before but here's the java class:
public class SOAPHello {
public String sayHello(String username) {
return "Hello,...
Hi
Storing sessions in disk very slow and painful for me. Im having very high traffic. I want to store session in Advanced PHP Cache, How can i make this ? Thanks
...
I have a site with many people from around the world. The entire thing is UTF-8 so people are free to submit content and speak in any language they wish - from Greek to English.
Now the only thing that the user can't control is the built in site language used for things like navigation and instructions for registering. These strings are...
So I'm working on a framework-esque system with one of my co-workers. Our current challenge is how to best implement statuses. Oftentimes, a status will carry with it unique data (a color for a table row, or text to be displayed to a user. etc). Currently, we have a statuses table which contains all this data. Contained in that table is ...
How do I change a files file-extension name in php?
example: $filename='234230923_picture.bmp'
and I want the extension to change to 'jpg'.
Thanks
...
I have an app that I'm migrating portions of to Django, but python and php have a different string format. E.g.
"Hello %1s" in php vs. "Hello {0}" or "Hello {name}" in python.
We'll be maintaining both apps for a while, but is there a way to use the python format in PHP or vice versa?
...
Each time i do
$country = $this->dom->saveXML(); // put string in country
$this->dom->save('country.xml');
It delets the old country.xml and creates a new country.xml
how can i append the old content of country.xml to the new content and save it again as country.xml
...
As far as I know, there are 3 types of comments recognized by PHP:
/* A block comment */
// A single-line comment
# Also a single-line comment
However, many coding standards, for example, those of PEAR or Kohana, discourage the last type of comments with no explanation. The question is, why is it so? Is this syntax planned for deprec...
what is the difference between ./folder-name/file.php and ../folder-name/file.php in php script?
...
In AS3 I can retrieve data via Zend just fine using this:
nc.call("Service.addNewService", responder);
But I'm having trouble when I want to ADD data to the database. To do so I need to pass in parameters to the php class. I can't find any documentation on how to pass multiple parameters.
var params = new Array("one", "two", "etc");
...
I want a reg exp for generating SEO-friendly URLs, so things like:
My product name
becomes
My_product_name
This is a long,long,long!!sentence
becomes
This_is_a_long_long_long_sentence
Basically so all non-alphanumeric chars are removed and replaced with underscores.
Any ideas?
...
In the string below, I want to replace <!--more--> with some text, FOOBAR, then truncate the string.
<p>The quick <a href="/">brown</a> fox jumps <!--more-->
over the <a href="/">lazy</a> dog.</p>
I've got to this point:
<p>The quick <a href="/">brown</a> fox jumps FOOBAR
... but as you can see, the <p> tag is not closed. Any ideas...
I have been trying to figure out how to go about doing this but I am not quite sure how.
Here is an example of what I am trying to do:
class test {
public newTest(){
function bigTest(){
//Big Test Here
}
function smallTest(){
//Small Test Here
}
}
publ...
I'm trying to search a UTF8-encoded string using preg_match.
preg_match('/H/u', "\xC2\xA1Hola!", $a_matches, PREG_OFFSET_CAPTURE);
echo $a_matches[0][1];
This should print 1, since "H" is at index 1 in the string "¡Hola!". But it prints 2. So it seems like it's not treating the subject as a UTF8-encoded string, even though I'm passing...