Close   

Admin and announcement forums

    30 Mar 2008
Php Mysql interview questions  
kumar rakesh
create and manage free online surveys with unlimited responses
Online surveys are now basic requirement of everyone who want to review there products or to make studies about anything. But finding a solution who can provide esurveys efficiently is really a big pain. creating an online survey with inefficient tool as irritating and getting survey conducted with limitations on responses is even worse.
cont..
    30 Mar 2008
Php Mysql interview questions  
kumar rakesh
practice interviews and prepare for interviews
in todays changing world every one want to increase there salaries very quickly.
Changes your employer is an very efficient solution for this. But changing employer and company is not so easy.

cont..

Viewed 152 times
Total posts : 0

    04 Mar 2008
Php Mysql interview questions  
Harish singh
His other forums
Php Mysql interview questions
What is XML?

XML (eXtensible Markup Language) is a data format for structured document interchange on the Web. It is a standard defined by The World Wide Web consortium (W3C).

 XML doesn't define what data is being stored or the structure of that data.

What are the Technology to Use for Parsing the XML ?

There are two types of XML parsers the we can use.

1. DOM (Document Object Module).
2. SAX (Simple API for XML).

DOM

 The DOM (Document Object Model) extension allows to operate on XML documents through the DOM API with PHP 5. DOM  is a standard defined by the W3C for accessing XML documents.

In PHP 4, DOM xml extension is not following the  standard method names.

As per the  new W3C compatibility, the old domxml-based scripts won't work anymore. The API is quite different in PHP 5. But if we used the "almost W3C compatible" method names available in PHP 4.3, We only need to change the loading and saving methods, and remove the underscore in the method names. Other adjustments here and there may be necessary, but the main logic can stay the same. Though we have not used earlier so these will not be a problem for us.

The easiest way to read a well-formed XML file is to use the DOM library . The DOM library reads the entire XML document into an object  and represents it as a tree of nodes,

 
SAX

SAX stands for Simple API for XML. It's a callback-based interface for parsing XML documents. SAX support has been available since PHP 3 and hasn't changed a lot since then. For PHP 5 the API is unchanged, The only difference is that it's not based on the expat library anymore, but on the libxml2 library.

Rather than treating an XML document as a tree-like structure, SAX treats it as a series of events such as startDocument or endElement. To accomplish this, a SAX appllication consists of a parser that sends these events to "handlers," methods or functions designated to handle them.


How can you block certain IP Addresses from accessing your site?

<?php
$banned = array("24.91.102.173", "64.21.162.113");
if (in_array($_SERVER['REMOTE_ADDR'], $banned)) {
echo "You have been banned.";
exit;
}
?>

In how many ways we can retrieve the data in the result set of
MySQL using PHP?

You can do it by 4 Ways

1. mysql_fetch_row.
2. mysql_fetch_array
3. mysql_fetch_object
4. mysql_fetch_assoc


What is the difference between $message and $$message?


following example.$message = “Mizan”;$$message = “is a moderator of PHPXperts.”;$message is a simple PHP variable that we are used to. But the
$$message is not a very familiar face. It creates a variable name $mizan
with the value “is a moderator of PHPXperts.” assigned. break it like
this${$message} => $mizanSometimes it is convenient to be able to have variable variable
names. That is, a variable name which can be set and used dynamically.
   
What are the different tables present in MySQL, which type of
table is generated when we are creating a table in the following syntax:
create table employee (eno int(2),ename varchar(10)) ?

Total 5 types of tables we can create
1. MyISAM
2. Heap
3. Merge
4. INNO DB
5. ISAM
MyISAM is the default storage engine as of MySQL 3.23 and as a result if
we do not specify the table name explicitly it will be assigned to the
default engine.


Suppose your Zend engine supports the mode <? ?> Then how can u
configure your PHP Zend engine to support <?PHP ?> mode ?


In php.ini file:
set
short_open_tag=on
to make PHP support


Draw the architecture of Zend engine?

The Zend Engine is the internal compiler and runtime engine used by
PHP4. Developed by Zeev Suraski and Andi Gutmans, the Zend Engine is an
abbreviation of their names. In the early days of PHP4, it worked as
follows:
The PHP script was loaded by the Zend Engine and compiled into Zend
opcode. Opcodes, short for operation codes, are low level binary
instructions. Then the opcode was executed and the HTML generated sent
to the client. The opcode was flushed from memory after execution.Today, there are a multitude of products and techniques to help you
speed up this process. In the following diagram, we show the how modern
PHP scripts work; all the shaded boxes are optional.
PHP Scripts are loaded into memory and compiled into Zend opcodes.


How can we convert the time zones using PHP?

By using date_default_timezone_get and
date_default_timezone_set function on PHP 5.1.0
<?php
// Discover what 8am in Tokyo relates to on the East Coast of the US

// Set the default timezone to Tokyo time:
date_default_timezone_set('Asia/Tokyo');

// Now generate the timestamp for that particular timezone, on Jan 1st, 2000
$stamp = mktime(8, 0, 0, 1, 1, 2000);

// Now set the timezone back to US/Eastern
date_default_timezone_set('US/Eastern');

// Output the date in a standard format (RFC1123), this will print:
// Fri, 31 Dec 1999 18:00:00 EST


echo '<p>', date(DATE_RFC1123, $stamp) ,'</p>';?>
Php Mysql interview questions Php Mysql interview questions
Php Mysql interview questions Be first to reply this discussion.
Php Mysql interview questions Php Mysql interview questions Php Mysql interview questions

Login to participate in forums
jump to :
Post reply on this forum

digoart.com 13 Nov 2008

Hi ,

In reply to MikeZeeWee post searching for web design/ hosting services, we would like to present you a new approach to a website design and marketing.

<b>DigoART</b> offers you a full range of services – starting from idea generation and sketches right through to a hosted, fully functioning business website. Your website will feature the latest SEO innovations to make it completely search engine friendly. More than that we will submit your website to all main search engines and directories, bringing you potential new audiences and customers. All features are provided for Your website – hosting, domain registration, emails, webmail interface and backup services.

Through a dedicated online PR team we can also help you organize PR and marketing campaigns in more than 15,000 possible publications!

The team of professional web designers , developers, SEO managers and PR staff will help to move your business move to the top in online and offline searches and enquiries.

Remember, through poor design, slow hosting, poor SEO and improper submission to directories, your website is virtually ineffectual, costing you valuable time and money and weakening your sales and growth opportunities. <b>With DigoART we guarantee you a top quality services at reasonable prices and dedicated, individual approach</b> to radically enhance your online presence.

<b>Please visit our website <a href=http://digoart.com>digoart.com</a> for more information, or call us now 0207 940 7175 to get more information on our services.</b>

Sincerely,
<a href=http://digoart.com>DigoART.com</a>

Comment on this forum
Name :
Email :
Comments :
Legends
Php Mysql interview questions Forums tagged Php Mysql interview questions Forums tagged. But locked for further reply
="Php Forums locked. can not accept further replies Php Mysql interview questions General forum