Search found 336 matches
- Sat May 17, 2008 11:08 pm
- Forum: PHP - Code
- Topic: design pattern for this case ??
- Replies: 0
- Views: 354
design pattern for this case ??
Hello forums!! I would like to know which design pattern would be useful in the following case: There are many modules and each module consists of many actions(multi stage actions). for example: Module A consists of action1.1, action1.2, action1.3 etc. Module B consists of action2.1, action2.2, acti...
- Sat May 17, 2008 11:08 pm
- Forum: PHP - Code
- Topic: design pattern for this case ??
- Replies: 3
- Views: 392
design pattern for this case ??
Hello forums!! I would like to know which design pattern would be useful in the following case: There are many modules and each module consists of many actions(multi stage actions). for example: Module A consists of action1.1, action1.2, action1.3 etc. Module B consists of action2.1, action2.2, acti...
- Sat May 17, 2008 10:53 pm
- Forum: Regex
- Topic: url rewrite regex help ??
- Replies: 6
- Views: 1716
Re: url rewrite regex help ??
I had found the solution as:
Code: Select all
RewriteRule ^admin/(?!(js|theme)($|/))(.*) admin_$3 [L]- Fri May 16, 2008 4:43 am
- Forum: PHP - Theory and Design
- Topic: backend in MVC pattern ??
- Replies: 1
- Views: 668
backend in MVC pattern ??
Hello forums!! I had some queries related to MVC pattern. I used to perform the uri action as: http://mysite.com/controller/method/params by default, I have used router tweaking for other than default routing. I would like to hear your views about backend development in MVC pattern. I had found in c...
- Wed May 14, 2008 1:45 am
- Forum: Regex
- Topic: url rewrite regex help ??
- Replies: 6
- Views: 1716
Re: url rewrite regex help ??
No it didnt work. I tested with following results: http://127.0.0.1/mysite/admin/personnels => url = admin_ersonnels [X] (P is ommitted) http://127.0.0.1/mysite/admin/login => url = admin_login [OK] (its ok) http://127.0.0.1/mysite/admin/js => url = admin_js [X] (assumed to be admin/js as it is) htt...
- Wed May 14, 2008 1:00 am
- Forum: Regex
- Topic: url rewrite regex help ??
- Replies: 6
- Views: 1716
url rewrite regex help ??
Hello forums I have some problem regarding regex in url rewriting. case: .htaccess Options -Indexes Options +FollowSymlinks RewriteEngine on RewriteRule ^admin/(.*)$ admin_$1 [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-l # Main URL ...
- Thu Apr 24, 2008 11:20 pm
- Forum: PHP - Code
- Topic: $_SERVER['HTTP_REFERER'] not working on the server ??
- Replies: 2
- Views: 170
$_SERVER['HTTP_REFERER'] not working on the server ??
Hello forums!! Case: In localhost: $_SERVER['HTTP_REFERER'] works fine but it shows error in the server as: " Undefined index: HTTP_REFERER". I dont know why its not working there. Whats the solution for this: any setting should be made to php.ini or else ? Thanks in advance for the help.
- Tue Apr 22, 2008 7:17 am
- Forum: PHP - Code
- Topic: how to delete array element with shifting the indexes ??
- Replies: 3
- Views: 106
Re: how to delete array element with shifting the indexes ??
Here is the solution:
Code: Select all
$array = array('x', 'y', 'z');
unset($array[1]);
array_values($array);
echo '<pre>';
print_r($array) ;
echo '</pre>';
- Tue Apr 22, 2008 4:23 am
- Forum: PHP - Code
- Topic: how to delete array element with shifting the indexes ??
- Replies: 3
- Views: 106
how to delete array element with shifting the indexes ??
hello forums!! Can anybody suggest in the following case: How to remove an element from an index array and reseting its indexes? Example: $array = array('x', 'y', 'z',..); unset($array[1]); print_r($array); // results: 0 => x, 2 => z ,which doesn't reset the indexes // I would like to have the resul...
- Fri Apr 04, 2008 1:34 am
- Forum: Javascript
- Topic: any good javascript ajax class ??
- Replies: 5
- Views: 477
Re: any good javascript ajax class ??
any specific native javascript class ?
actually prototype, mootools etc are js frameworks.
Anyway thanks.
actually prototype, mootools etc are js frameworks.
Anyway thanks.
- Fri Apr 04, 2008 1:16 am
- Forum: Javascript
- Topic: any good javascript ajax class ??
- Replies: 5
- Views: 477
any good javascript ajax class ??
Hello forums!!
Can anybody refer a good javascript Ajax class (with loading page effects more preferrable(wink)),
which can be used with just creating objects and with minimal amount of code?
Thanks in advance for the help.
Can anybody refer a good javascript Ajax class (with loading page effects more preferrable(wink)),
which can be used with just creating objects and with minimal amount of code?
Thanks in advance for the help.
- Fri Apr 04, 2008 1:03 am
- Forum: PHP - Code
- Topic: how to accomplish this ?
- Replies: 2
- Views: 109
Re: how to accomplish this ?
I got the solution;Here it goes: <?php // convert to timestamp $start = strtotime( '2006-05-10 00:00:00'); $end = strtotime( '2007-08-15 00:00:00'); // initialize an array to hold the saturdays $saturdays = array(); $monthSaturdays = array(); // this is for question 1 for ( $i = $start; $i <=...
- Thu Apr 03, 2008 4:25 am
- Forum: PHP - Code
- Topic: how to accomplish this ?
- Replies: 2
- Views: 109
how to accomplish this ?
Hello forums!! Suppose consider the following case: I had the following date range: From: 2006-05-10 To: 2007-08-15 Q's? 1> How to find the no of saturdays within the range with appropriate date format ie YYYY-mm-dd . 2> How to find the first and last saturday of each month within the range ? Thanks...
- Wed Apr 02, 2008 5:26 am
- Forum: PHP - Code
- Topic: how to avoid collision of objects ??
- Replies: 3
- Views: 96
how to avoid collision of objects ??
Hello forums!! Suppose we had the following classes: class A{ var $obj_array = array(); function setObject($classB_obj){ $this->obj_array[] = $classB_obj } } class B{ var $id; var $name; function B($id, $name){ // necessary initialisation } } Case: I wou...
- Thu Mar 27, 2008 3:42 am
- Forum: PHP - Code
- Topic: Which one is better & why ?
- Replies: 2
- Views: 130
Which one is better & why ?
~pickle | Please use [ code=html ], [ code=php ], etc tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: :arrow: Posting Code in the Forums to learn how to do it too. Hello forums !! I would like to know a few things about OOP. Which...