Disable Zend Autoloader
How can I disable the Zend_Loader_Autoloader? ...
How can I disable the Zend_Loader_Autoloader? ...
Hi guys, first post on stackoverflow! We are developing a php contact manager. We wanted to create the possibility to sync the contacts with ms exchange enabled phones (android, iphone, blackberry). I found this link http://www.troywolf.com/articles/php/exchange_webdav_examples.php#create_contact but what I need is more on the sync side,...
Is getting the version of a exe possible with php? I'd like to print the version of a file that can be downloaded... Windows exe and php is running on linux server ...
What is the most secure way to stop users adding html or javascript to a field. I am adding a youtube style 'description' where users can explain their work but I don't want anything other than plain text in there and preferable none of the htmlentities rubbish like '<' or '>'. Could I do something like this: $clean = htmlentities($_PO...
Well, I have MAMP installed on my Mac OS X, and I've got PostGres up and running, but am wondering how I can use it with PHP? I'm assuming that there's something I need to do where I compile PHP so that it can use both, but, I'm not sure how to do that if PHP has already been installed? Or, if there's something unique I need to do to g...
I've been debugging some Soap requests we are making between two servers on the same VLAN. The app on one server is written in PHP, the app on the other is written in Java. I can control and make changes to the PHP code, but I can't affect the Java server. The PHP app forms the XML using the DOMDocument objects, then sends the request us...
I know there is array_key_exists() but after reading the documentation I'm not really sure if it fits for this case: I have an $array and an $index. Now I want to access the $array, but don't know if it has an index matching $index. I'm not talking about an associative array, but an plain boring normal numerically indexed array. Is the...
I want a way to have my code style do something like this.. this comment is in PHP but the concept should work for any eclipse compatible language. /* * @author ${user} * @version ${version} */ I would want to update the version variable once, then commit to the repository. So, now when others add comments it would include the Versi...
I understand the basics of inheritance but this one is confusing me. How would you go about saying: An album object has one or more artist objects An album object has one or more song objects My current code only will only allow one song per object: class Song extends Album{} class Album extends Artist{} I'm sure i'm overlooking s...
What is the correct syntax for a regular expression to find multiple occurrences of the same string with preg_match in PHP? For example find if the following string occurs TWICE in the following paragraph: $string = "/brown fox jumped [0-9]/"; $paragraph = "The brown fox jumped 1 time over the fence. The green fox did not. Then the br...
Example: I have an variable like $method = "doSomething"; Assume that I have an $myObject which knows a nonstatic, public method doSomething() Could I then just call that method by doing this? $myObject->$method(); Or is there another / better way? ...
This is the PHP code used for the upload: $upload = "uploads/"; $upload = $upload . basename($_FILES['bgimage']['name']); if (move_uploaded_file($_FILES['bgimage']['tmp_name'], $upload)) { echo "The file has been uploaded successfully."; } else { echo "Error"; } When I test the script, it says "The file has been uploaded succes...
Hi, after reading this question i wonder if someone can help me understand how to implement correctly Dependency Injection with these PHP Classes: class DBClass { private $mMysqli; function __construct(mysqli $database) { $this->mMysqli=$database; } function __destruct() { $this->mMysqli->close(...
As a beginner with MySQL, I want to get this right. My main hangup right now is the DECIMAL type. From the docs: As of MySQL 5.0.3, values for DECIMAL columns are represented using a binary format that packs nine decimal (base 10) digits into four bytes. Before MySQL 5.0.3, DECIMAL columns are represented as strings and st...
Hello. http://windows.php.net is currently down, it seems (gives me 404 error). Anyone knows where I can download php-5.3.1-Win32-VC9-x86.zip? When windows.php.net is expected to be up? Thanks. P.S. Isn't this a question for serverfault? Couldn't decide for sure... ...
in java you can have same type of classes and interfaces in same package. i wonder how you could organize code in this way in php. have them in different folders? or use extend on them so you at least can organize them by superclass? (which you could do in java also). ...
Ive been having trouble with a php and JavaScript upload script accepting large file uploads with Dreamhost. I realize that you are supposed to edit php.ini to change post max size and the memory limit, but it isn't behaving as it should. The only way I have ever successfully had a large file upload was switching to Dreamhost PS and mak...
I have a popup that contains a subscriber sign up form. After the user clicks subscribe I want the form be removed and display a thank you message. All this needs to run using php. Below is what I have so far, but the popup doesn't stay up and when clicking on the subscribe button again it shows the form validation errors because the '...
When an array is passed as an argument to a method or function is it passed by reference? What about doing this: $a = $array(1,2,3); $b = $a Is $b a reference to $a? ...
I am sending a status code via the header function, such as header('HTTP/1.1 403');, and would like to in another area of my code detect what status code is to be sent (in particular if I have sent an error code of some nature). As has been mentioned elsewhere, headers_list() does not return this particular item, and it's unclear to me i...