Probably a trivial question, but in which order does Exception::getTrace return calls? Most recent first or last? I'd like to know before I implement my error handler.
BenTheDesigner
Hi All
I don't usually use regular expressions, hence my question. I need a regex to match the following:
'{any-string}'.
Any assistance appreciated.
BenTheDesigner
Hi All
Currently developing a PHP framework and have ran into my first problem. I need to be able to drop the framework into any folder on a server, no matter how many folders deep, and need to find that directory to use as a base URL.
For example, it currently works if I put the framework in the root of the server (http://cms.dev/), but if I were to put it in http://cms.dev/folder/ it does not work.
Please advise, any comments welcome.
BenTheDesigner
Hi All
I am developing a user manager which must control access to the detail view of editable items. At present, when a user clicks 'edit', the application queries the link table to check if a user is currently editing that page, if not, it allows access to the page and then inserts a record into the link table preventing another user from editing the same page at the same time.
My question is what would the best way to handle the removal of records if say a user exists the browser without saving etc, therefore no action to remove the record.
I have a couple of ideas but would like other input before I decide.
BenTheDesigner
Given this example, how would I return the result of the equation rather than the equation itself as a string?
$operator = '+';
foreach($resultSet as $item){
$result = $item[$this->orderField] . $operator . 1;
echo $result;
}
Hi All
Is it possible, in any way, to pass comparison operators as variables to a function? I am looking at producing some convenience functions, for example (and I know this won't work):
function isAnd($var, $value, $operator = '==')
{
if(isset($var) && $var $operator $value)
return true;
}
if(isAnd(1, 1, '===')) echo 'worked';
Thanks in advance.