We can use a simple JavaScript code linked to an event trigger of any form field. In the JavaScript code, we can call the document.form.submit() function to submit the form
....!
a) sizeof($urarray) This function is an alias of count()b) count($urarray)
....!
Exceptions
PHP 5 has an exception model similar to that of other programming languages. An exception can be thrown, try and caught within PHP. A Try block must include at least one catch block. Multiple catch blocks can be used to catch different classtypes; execution will continue after that last catch block defined in sequence. Exceptions can be thrown within catch blocks.
When an exception is thrown, code following the statement will not be executed and PHP will attempt to find the first matching catch block. ....!
ORDER BY [col1],[col2],…,[coln]; Tels DBMS according to what columns it should sort the result. If two rows will hawe the same value in col1 it will try to sort them according to col2 and so on.
GROUP BY [col1],[col2],…,[coln]; Tels DBMS to group results with same value of column col1. You can use COUNT(col1), SUM(col1), AVG(col1) with it, if you want to count all items in group, sum all values or view average
....!
<?php $p = getcwd(); echo $p; ?>
Ans: getcwd() Here I have stored my files under httdocs (using php5,i haven't checked under php4) so I get the output as C:\apache2triad\htdocs you may get your path information while runnings the above code. :)
1. Do not trust user input. 2. Validate user input on the server side. 3. Do not use user input directly in your MySQL queries. 4. Don't put integers in quotes In your MySQL queries. 5. Always escape the output using php built in functions. 6. When uploading files, validate the file mime type using php. 7. If you are using 3rd party code libraries, be sure to keep them up to date. 8. Give your database users just enough permissions. 9. Do not allow hosts other than local....!
The Session Manager session support allows multiple server instances to share a common pool of sessions, known as a session cluster
Session clustering setting up methods :
#1)First methods, is to have a NFS shared where session will be store. Setting this is quite easy, just a little modification on php.ini file to change the “session.save_path ? directive to point to the NFS share. The main problem with NFS is on high traffic, NFS share is really slow. So synchronisation and data corruption can arrive and ....!
If you store a session in a database you have several advantages:
@ Improving the security because on many hosting packages (shared host) PHP uses the same path for storing sessions for all the users, somewhere that is not in your folders. @ You can track who is online etc. @ For application that are running on multiple servers, you can store all the session data in one database.
The real beauty of this approach is that you don't have to mod....!
DROP TABLE table_name
Will DELETE the table and DATA
TRUNCATE TABLE table_name
Will DELETE the table DATA not the table definition
....!
ANS:XMLHttpRequest
....!
There are a few things you should be aware of:
1. Since cookies are used to record information about your activities on a particular domain, they can only be read by the domain that created them
2. A single domain cannot set more than twenty cookies, and each cookie is limited to a maximum size of 4 KB
3. A cookie usually possesses six attributes, of which only the first is mandatory. Here they are: * name: the name of the cookie * value: the value of the cookie
AJAX requests should use an HTTP GET request when retrieving data where the data will not change for a given request URL. An HTTP POST should be used when state is updated on the server. This is in line with HTTP idem potency recommendations and is highly recommended for a consistent web application architecture.
....!
Calculate the md5 hash of a string. The hash is a 32-character hexadecimal number.
....!
1. fget(); 2. file_open(); 3. fopen(); 4. open_file();
ANS:fopen();
....!
<?
$string = 'APPLE';
echo stristr($string, 97);
?>
a) Error
b) APPLE
c) Apple
d) None of the above
ANS : APPLE
....!
<?
$string = 'APPLE';
echo stristr($string, 97);
?>
a) Error
b) APPLE
c) Apple
d) None of the above
ANS : APPLE
....!
Recent comments
3 weeks 3 days ago
4 weeks 2 days ago
4 weeks 2 days ago
4 weeks 2 days ago
5 weeks 4 days ago
6 weeks 3 days ago
6 weeks 5 days ago
7 weeks 2 days ago
9 weeks 13 hours ago
9 weeks 13 hours ago