<?php echo "www.w3answers.com"; if ((string)'-1') { print 'ouch'; } else { print 'echo'; } ?>
a. ouch b. echo c. none d. Parse error
ANS: a
....!
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
....!
1)Call to undefined function we_w3answers() *****************************************
PHP is trying to call the function we_w3answers(), which has not been because you misspelled the name of a function (built-in or user-defined) simply omitted the function definition. If you use include/require functions, make sure that you are loading the appropriate files.
2)Call to undefined function array() ***********************************
This problem has a cause that i....!
* Anything from a form* Anything from $_GET, $_POST, $_REQUEST* Cookies ($_COOKIES)* Web services data* Files* Some server variables (e.g. $_SERVER['SERVER_NAME'])* Environment variables* Database query results
Filter supports get, post, cookies, server and environment variables as well as defined variables (server support may not work in all sapi, for filter 0.11.0 or php 5.2.0).
....!
<?php $x = 3; switch ($x) { case 2: echo 'line 1'; break; case 3: case 4: echo 'line 2'; break; default: echo 'line 3'; } ?>
a. echo 'line 3'; b. echo 'line 2'; c. Error d. None of the above
Ans: b (Answer is line2)
www.w3answers.com
....!
1. redir() 2. header() 3. location() 4. redirect()
ANS:header()
....!
1)Time triggered caching (expiry timestamp).
2)Content change triggered caching (sensitive content has changed, so cache must be updated).
3)Manually triggered caching (manually inform the application that information is outdated, and force a new cache creation).
....!
PHP to ASP
Let's first look at how you can pass data from PHP to ASP using WDDX.
You create a WDDX packet by first serializing data into a WDDX packet and then presenting it.
WDDX can convert most variable types that applications use, such as strings, integers, and arrays. After a variable has been converted to a WDDX variable type, it is ready for another application to pick up.
PHP has WDDX support built in, so you don't need to modify your PHP.ini file to start using WDDX.
A ....!
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....!
....!
a) sizeof($urarray) This function is an alias of count()b) count($urarray)
....!
There are a few inbuilt options you can use however, for example getimagesize() can return the mimetype, as does some of the new fileinfo functions. The mime type in getimagesize is stored in 'mime', and can be accessed as shown below.
<?php
$parts = getimagesize($filename); echo $parts['mime'];
?>
or
<?php
$parts = getimagesize($filename); $allowedMimes = array('image/jpg', 'image/png', 'image/gif');
if(in_array(....!
Set char to occupy n bytes and it will take n bytes even if u r storing avalue of n-m bytes
Set varchar to occupy n bytes and it will take only the required space and will not use the n bytes
eg. name char(10) will waste 5 bytes if we store ‘testname’, if each char takes a byteeg. name varchar(10) will just use 5 bytes if we store ‘testname’, if each char takes a byte. rest 5 bytes will be free.
....!
<?php $banned = array("24.91.102.173", "64.21.162.113"); if (in_array($_SERVER['REMOTE_ADDR'], $banned)) { echo "You have been banned."; exit; } ?>
....!
Smarty is a template engine written in PHP. Typically, these templates will include variables —such as {$variable}— and a range of logical and loop operators to allow adaptability within of the template.
....!
Smarty is a template engine written in PHP. Typically, these templates will include variables —such as {$variable}— and a range of logical and loop operators to allow adaptability within of the template.
....!
Recent comments
20 weeks 23 hours ago
13 weeks 1 day ago
23 weeks 1 day ago
23 weeks 4 days ago
28 weeks 15 hours ago
28 weeks 3 days ago
28 weeks 6 days ago
28 weeks 6 days ago
29 weeks 5 days ago
30 weeks 6 days ago