Professional Documents
Culture Documents
8.Ques:How to strip whitespace (or other characters) from the beginning and end of a
string ?
Answer : The trim() function removes whitespaces or other predefined characters from both
sides of a string.
19.Ques:In how many ways we can retrieve the data in the result set of MySQL using
PHP?
Answer : We can do it by 4 Ways 1. mysql_fetch_row. 2. mysql_fetch_array . 3.
mysql_fetch_object . 4. mysql_fetch_assoc.
23.Ques:Suppose your Zend engine supports the mode Then how can u configure your
PHP Zend engine to support mode ?
Answer : In php.ini file: set short_open_tag=on to make PHP support .
34.Ques: What are static method? How its different from normal method?
Answer : Static methods are that can be accessed by using the scope resolution operator (i.e
::) and object reference operator ( i.e.-> ). For example HelloClass::mystatic(); $helloClass-
>mystatic();
39.Ques: How can we know the number of days between two given dates using PHP?
Answer : $date1 = date(“Y-m-d”); $date2 = “2006-08-15″; $days = (strtotime($date1) –
strtotime($date2)) / (60 * 60 * 24);
41.Ques: How many ways we can we find the current date using MySQL?
Answer : SELECT CURDATE(); CURRENT_DATE() = CURDATE() for time use
SELECT CURTIME(); CURRENT_TIME() = CURTIME()
42.Ques:How can we find the number of rows in a result set using PHP?
Answer : $result = mysql_query($sql, $db_link); $num_rows = mysql_num_rows($result);
echo “$num_rows rows found”;
49.Ques:How many ways we can pass the variable through the navigation between the
pages?
Answer : • GET/QueryString • POST
50.Ques:How can we set and destroy the cookie n php ?
Answer : By using setcookie(name, value, expire, path, domain); function we can set the
cookie in php ; Set the cookies in past for destroy. like setcookie(“user”, “sonia”,
time()+3600); for set the cookie setcookie(“user”, “”, time()-3600); for destroy or delete the
cookies;
51.Ques:How can we destroy the session, how can we unset the variable of a session?
Answer : session_unregister – Unregister a global variable from the current session
session_unset – Free all session variables
52.Ques: How many ways can we get the value of current session id?
Answer : session_id() returns the session id for the current session.
68.Ques: What do we use to remove duplicate records while fetching a data in mysql ?
Answer : We use DISTINCT keyword.
69.Ques: Why do we use multipart/form-data in html form?
Answer : This is the encoding used to send image or files via form, The data will be split into
multiple parts and, one for each files plus one for the text of the form body that may be sent
with them.
74.Ques: How can we pass the variable through the navigation between the pages?
Answer : It is possible to pass the variables between the PHP pages using sessions, cookies or
hidden form fields.
75.Ques:What are the three classes of errors that can occur in PHP?
Answer : The three basic classes of errors are notices (non-critical), warnings (serious errors)
and fatal errors (critical errors).
83.Ques: How do you know (status) whether the recipient of your mail had opened the
mail i.e. read the mail?
Answer : Embed an URL in a say 0-byte image tag may be the better way to go. In other
word, you embed an invisible image on you html email and when the src URL is being
rendered by the server, you can track whether your recipients have view the emails or not.
88.Ques: How can we get the ID generated from the previous insert operation?
Answer : SELECT MAX(ID) from tablename;
89.Ques: How to limit the number of rows to 5 that I get out of my database?
Answer : Select * from tablename LIMIT 0, 5;
93.Ques:If we use SUM function in mysql, does it return sum of that row or for that
column.
Answer : Sum function works on the column basis and will return the sum of that particular
row only.
94.Ques:What is JOIN in mysql? What are the different types of join.
Answer : When we have to fetch records from more than one table we can use JOIN
keyword. The process is known as joining the tables. There are various types of join like
INNER JOIN, LEFT JOIN, RIGHT JOIN, and OUTER JOIN.
107.Ques:What are the reasons for selecting lamp (Linux, apache, MySQL, PHP)
instead of combination of other software programs, servers and operating systems?
Answer : All of those are open source resource. Security of Linux is very very more than
windows. Apache is a better server that IIS both in functionality and security. MySQL is
world most popular open source database. PHP is more faster that asp or any other scripting
language.
117.Ques: How can we change the maximum size of the files to be uploaded?
Answer : We can change the maximum size of files to be uploaded by changing
upload_max_filesize in php.ini.
118.Ques: How can we get the error when there is a problem to upload a file?
Answer : $_FILES[‘userfile’][‘error’] contains the error code associated with the uploaded
file.
119.Ques:What is the difference between $_FILES[‘userfile’][‘name’] and
$_FILES[‘userfile’][‘tmp_name’]?
Answer : $_FILES[‘userfile’][‘name’] represents the original name of the file on the client
machine,
$_FILES[‘userfile’][‘tmp_name’] represents the temporary filename of the file stored on the
server.
Content
Editors
Editors-xtd
System
Search
180.Ques:Why do you think Drupal is powerful & popular CMS compare to others?
Answer : Drupal Allows to create multiple content types using content construction kit (cck)
without any programming skills. Also allows customize theme template for each content
type. For example you can have page, article , story, slideshow content type.
181.Ques:What is Drupal?
Answer : Drupal is a Content Management System (CMS). It’s an open source content and
free CMS framework written in PHP. It enables you to organize, manage and publish content
with ease and comes with a variety of customization option.
182.Ques:What is Drupal’s taxonomy system and what are some of its key features?
Answer : Drupal comes with a built in taxonomy system that allows for categorization of the
nodes on a site.
The taxonomy system allows for arbitrary definition of terms, as well as arbitrary
organization of those terms into vocabularies. There is no limit to the number of vocabularies
that can be created, nor is there any limit to the number of terms that can be included in a
vocabulary.
A vocabulary can also have free tagging which means that, instead of entering specific terms
ahead of time, users may enter tags freely at the time the content is created and those tags
automatically become terms in that vocabulary.
Drupal’s taxonomy system is one if its most powerful and flexible features.
It connects your website to other sites and services using feeds, searc
h engine connection capabilities etc.
Drupal is open source software hence requires no licensing costs.
Drupal can publish your content on social media such as Twitter, Facebo
ok and other social mediums.
190.Ques:Describe the Field API that was introduced into core in Drupal 7.
Answer :
The Field API allows custom data fields to be attached to Drupal entiti
es and takes care of storing, loading, editing, and rendering field dat
a. Any entity type (node, user, etc.) can use the Field API to make its
elf “fieldable” and thus allow fields to be attached to it. Other modul
es can provide a user interface for managing custom fields via a web br
owser as well as a wide and flexible variety of data type, form element
, and display format capabilities.
The Field API defines two primary data structures, Field and Instance, a
nd the concept of a Bundle. A Field defines a particular type of data t
hat can be attached to entities. A Field Instance is a Field attached t
o a single Bundle. A Bundle is a set of fields that are treated as a gr
oup by the Field Attach API and is related to a single fieldable entity
type.
Different displays can present the query results as pages with fixed UR
Ls on your site (or URLs accepting arguments), blocks, feeds, or panel p
anes.
You can also use Views to present related content or implement contextu
al filters. For example, you can display a list of users along with lin
ks to the content they have created and/or you can display customized c
ontent to a user according to their user ID.
Drupal
Joomla
WordPress
TYPO3
Views
Token
Ctools
Quicktabs
Pathauto
Evaluating Drupal
Demoing Drupal
Learning Drupal
Quickly binding Site
Evaluating Drupal
Demoing Drupal
Learning Drupal
Quickly binding Site