I coming from a J2EE background and it seems that it is very common for PHP developers to turn off and ignore notices with the statement:
error_reporting(E_ALL & ~E_NOTICE);
The application that I'm working is full of messages about unset variables?
This seems very odd to me.
...
This question is likely to be somewhat longer than SO's average questions, so I'll try to keep it as short as possible:
I'm designing a dynamic form that users need to fill in and submit. This form is massive, with over 500 possible questions. The questions displayed to the user depend on answers given in previous answers (for example; ...
hello I am searching for all instances of tags with the EXACT class "hello" using simple_html_dom
foreach($html->find('.hello')as $found
The above doesn't quite do this because it also gives me classes like "hello world". It is simple yes to count through and list the correct element from the array but the source html that is being pa...
Say I have a group of people, each person having a name, sex, and age property, coded like this:
public class Person
{
private $name, $sex, $age;
public function Person ($name, $sex, $age)
{
$this->name = $name;
$this->sex = $sex;
$this->age = $age;
}
public function getName();
public function ...
I recently installed phpunit on my server via the pear installer.
When I go to run a test I get the following error:
PHP Warning: require_once(PHPUnit/Util/Filter.php): failed to open stream: No such file or directory in /usr/bin/phpunit on line 44
PHP Fatal error: require_once(): Failed opening required 'PHPUnit/Util/Filter.php' (i...
I've being developing with Django for about two years. I recently was hired by a company that has about 20 sites that are all PHP. The PHP is very old and has really bad coding practices.
I would like to switch them over to Django but that might take awhile as the site have heavy e-commerce integrations. In the meantime I would like to ...
And another one would be do I really need to have a license? I mean Bing Maps is running just fine.
...
I'm writing a bot for the IMified network.
I want to filter the items processed by my bot by only accepting certain values into my script.
This is what I'm using right now:
$items = array('botkey', 'userkey', 'network', 'user', 'channel', 'msg', 'step');
foreach ($_POST as $key => $value)
{
if (in_array($key, $items) || preg_matc...
I am trying to start my VPN connection (using VPNC) from PHP. I have to do it this way because it is closed remotely if there isn't activity so I can't just leave it running on the server. I am able to do it from the command line by typing:
/usr/local/sbin/vpnc --natt-mode force-natt
This works. It doesn't require any input from me...
I have a class with member variables. What is the syntax in PHP to access the member variables from within the class when the class is being called from a static context?
Basically I want to call a class method (but not create a new object), but when the class method is called, I want a handful of static constant variables to be initia...
Hi everyone,
I'm coding a website in PHP/MySQL and I'd like to implement a similar to stackoverflow tagging engine. I have 3 relevant tables in DB:
1. Items
2. Tags
3. ItemTagMap (maps tags to items, n:n mapping)
Now, on search page I'd like to show distinct list of all tags for entire search result (not just the current page), so that...
I'm writing some code to talk to a web service via WSDL-SOAP. I'm using php5's native soap implementation. So far so good.
However I now need to download files as "attachments" over soap. The interwebs is mysteriously silent on how to do this. Surely its possible or the PHP docs would mention it as a limitation ? :\ I did this a few yea...
Where can find a very good PHP CMS/BLOG tutorial with objects and classes?
...
Have anyone reading the description of PHP user authentication system at Wikibooks?
http://en.wikibooks.org/wiki/PHP%5FProgramming/User%5Flogin%5Fsystems
Is it good? Secure? Correct?
...
I have an application that analyzes data from input files that are generated by our core system. Depending on the client, that file can vary in size (files contain online marketing metrics such as clicks, impressions, etc..). One of our clients has a website that gets a fairly large amount of traffic, and the metric files generated are...
This seems like it should be simple. Any pointers would be much appreciated.
Consider three sites:
widgetserver.com, which serves widgets to client sites
clientsite.com, which displays the widget
previoussite.com, which is a site that links to clientsite.com
In clientsite.com's page there is a piece of code that calls a PHP function...
hi when I try saving data using a model loaded from loadModel(), it saves twice on the database, why is that?
...
What is the best way to save a URL or symbols into a MYSQL database.
I'v seen this being used "{$htmlOutputArray[1]}"
and then else where this "$htmlOutputArray[1]"
and some other places do what i'v done below... but which is the best?
So far I have: (example code)
$html = "034251\nhttp://stackoverflow.com/questions/ask"
$htmlOutputAr...
Hi guys I'm in a bit of a pickle here now. Well to start with I built a simple CMS in PHP with an admin panel the directory structure is like this:
root/
->admin/
->images/
It worked fine as is however the client requirements changed and they wanted that instead of having to access the admin folder as a folder within the root ...
Hi all
How can we able to protect a site using USERNAME and PASSWORD after we entering the URL and the site is before loading
For ex: http://www.buildyourownbouquet.com/
I need exactly what it looks like...
Thanks in Advance
Fero
...