| |
How will you
set the values for cookies?
<% Response.Cookies("variable name ")="value" %>
What are the collections of Application Object?
* Contents collection – contains all variables added via
scripts in global.asa.
* Static collection – contains the names of all objects
added via the <OBJECT> tag in global.asa.
What are the tags necessary to be present within the <FORM>
tag?
<INPUT> tag: Provides input spaces (text boxes, combo boxes,
radio button, etc.) on a form called fields. It has three
attributes TYPE, NAME and VALUE. TYPE provides the
characteristics of the field and the NAME specifies a name to
the field by which it can be referred.
What are the methods in Session Object?
The Session Object has only one method, which is Abandon. It
destroys all the objects stored in a Session Object and
releases the server resources they occupied.
What is the maximum size of an array?
Up to 60 dimensions
What is a "Virtual Directory"?
Virtual directories are aliases for directory paths on the
server. It allows moving files on the disk between different
folders, drives or even servers without changing the structure
of web pages. It avoids typing an extremely long URL each time
to access an ASP page.
What is Querystring collection?
This collection stores any values that are provided in the
URL. This can be generated by three methods:
• By clicking on an anchor tag <A>
• By sending a form to the server by the GET method
• Through user-typed HTTP address
What are the attributes of the <FORM> tags? What are their
functions?
The two attributes are ACTION and METHOD
The ACTION gives the name of the ASP file that should be
opened next by which this file can access the information
given in the form
The METHOD determines which of the two ways (POST or GET) the
browser can send the information to the server
Which is the default Data types in VBScript?
Variant is the default data type in VBScript, which can store
a value of any type.
What is a variable?
Variable is a memory location through which the actual values
are stored/retrieved. Its value can be changed.
Give the comment Tags for the following:
VBScript : REM & ‘(apostrophe)
JavaScript : // (single line comment)
/* */ (Multi-line comments)
How can you disable the browser to view the code?
Writing codes within the <! -- //-- > Tag.
What is ServerVariables collection?
The ServerVariables collection holds the entire HTTP headers
and also additional items of information about the server.
What is application Object?
Shares information among users of an application. Gives a
notification when an application starts or ends.
What happens to a HTML page?
The browser makes a HTTP request; the server gives a HTTP
response to the browser and the browser converts into a HTML
page.
What is
Scripts and Files?
Answer :
A script may include many files, this enables PHP coders to
write some of the code once, and use it in many scripts, to
include an external file into your script, you can use one of
the following:
1. include: reads the external file, and interprets it, if the
external file can’t be found, a warning is produced, and the
execution continues.
2. require: the same as includes, but it causes the execution
to stop.
3. include_once: works the same way as include, but the
included file will be interpreted just once, at the first time
it’s included, if it’s included again in the same file, it
won’t be interpreted again.
4. require_once: the same as require, but also interpreted
once like include_once.
What is the difference between include and require?
Answer :
The basic difference is how they handle failures. If the file
is not found by require(), it will cause a fatal error and
halt the execution of the script. If the file is not found by
include(), a warning will be issued, but execution will
continue.
Is it possible manipulate visual objects in PHP ?
Answer :
Generally it is, but as PHP is mostly used as a web scripting
language it runs in the web servers context, thus visual
objects will never appear on the servers desktop. If you use
PHP for application scripting e.g. in conjunction with PHP-GTK
there is no limitation in accessing and manipulating visual
objects through COM.
How to embed PHP code in a File?
Answer :
To embed PHP code inside a file, it has to be inside a special
set of opening and closing tags.
PHP supports the following tags sets:
1. Opening (< ?php) and closing (? >)
2. Opening (< ?) and closing (? >)
3. Opening (< %) and closing (% >)
4. Opening (< script language=”php” >) and closing (< /script
>)
Example:
< html >
…..< head >
……….< title >Sample document< /title >
…..< /head >
…..< body >
……….< ?php
...............echo “Sample text”;
..........? >
…..< /body >
< /html >
Why PHP is Better choice among the other scripting
languages?
Answer :
PHP is easy to learn.
PHP is free.
PHP can run on Windows and Unix servers.
PHP is very fast.
When to use PHP?
Answer :
PHP is Scripting Language and can be used when:
Creating Web pages that contain dynamic contents.
Responding to HTML forms.
Accessing databases.
Securing data.
What is difference between PHP and HTML?
Answer :
HTML files are requested by browser, and returned by server.
PHP files are requested by browser, and executed by the server
to output a plain HTML that is returned to the browser.
What are XML Data Islands? And what is their application?
Answer :
Internet Explorer 5 introduced a new concept of embedding
chunks of XML data inside the Web HTML page, and then
accessing that XML data either from the client-side script or
directly binding that data to the HTML controls such as HTML
tables. These are known as XML Data Islands and sometimes turn
out useful in scenarios such as in avoiding the round-trip to
the server. The XML data is enclosed between the special tags
().
What is XSLT? And what’s its use?
Answer :
XSL Transformations (XSLT) is yet another popular W3C
specification that defines XML-based syntax, used to transform
XML documents to any other text format, such as HTML, text,
XML, etc. XSLT stylesheets can be applied on the source XML
document to transform XML into some other XML, or text, HTML,
or any other text format.
What is XHTML?
Answer :
Is simple words, XHTML, or Extensible HTML, is HTML 4 with XML
rules applied to it (each begin tag must have an end tag,
attribute values in single/double quotes, etc.). However, the
overall vision of XHTML is much more than that. In addition to
using XML syntax for HTML, XHTML also encloses specifications
such as XHTML Basic (minimal set of modules for devices such
as PDAs), XForms (represents the next generation of forms for
the Web, and separates presentation, logic, and data), XML
Events (provides XML languages with the ability to uniformly
integrate event listeners and associated event handlers), etc.
What is the use of Namespaces in XML?
Answer :
As XML does not predefine any set of tags/attribute names.
Hence, it is quite possible that two totally different XML
documents, defined by two totally different people/ companies,
use the same tag name/attribute name. If an application needs
to use (merge, process, etc.) above two XML documents
together, this would cause confusion and we need a way to
distinguish deterministically between tags with the same name.
XML Namespaces are used for this purpose. Namespaces are
defined using URI (Uniform Resource Identifier), and then
associated with the element/attribute names. Namespaces are
also used to “group” a logically related set of XML
vocabulary.
Is it possible to include international character (such as
Japanese, or Chinese) characters inside an XML document. If
yes, how?
Answer :
Yes, XML being a Unicode-text-based standard supports
international characters. The encoding attribute value in the
XML declaration line () needs to be properly set in such
cases.
|