Search Results

Search found 7 results on 1 pages for 'benthedesigner'.

Page 1/1 | 1 

  • Return current web path in PHP

    - by 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

    Read the article

  • Locking a detail view if a user is editing the item...

    - by 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

    Read the article

  • Variable Operators in PHP

    - by 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; }

    Read the article

  • Dynamic Comparison Operators in PHP

    - by BenTheDesigner
    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.

    Read the article

1