There are two basic things covered here.
The form that will be used to post the file data to and the actual program that does the uploading. Further we will discuss the method that PHP itself suggests for uploading files.
Process 1 HTML PART
<form enctype="multipart/form-data" action="__URL__" method="POST"> <input type="hidden" name="MAX_FILE_SIZE" value="30000" /> Upload a file: <inpu....!
....!
$message is a simple variable whereas $$message is a variable's variable,which means value of the variable. Example: $user = 'bob'
is equivalent to
$message = 'user'; $$message = 'bob';
....!
Ans:
CHAR is a fixed length data type.
CHAR(n) will take n characters of storage even if you enter less than n characters to that column. For example, "answers" will be stored as "answers " in CHAR(10) column.
VARCHAR is a variable length data type.
VARCHAR(n) will take only the required storage for the actual number of characters entered to that column. For example, "answers" will be stored as "answers&q....!
<?php $findme = 'a';
$mystring2 = 'ABC'; $pos1 = stripos($mystring2, $findme); if ($pos1 === false) { echo "string is not matched"; } else {echo ‘ match found’;} ?>
a) String not matched b) Match found c) All of the above d) None of the above
ANS : b (note stripos)
Hi my dear friends.
Everybody knows what is cookie and session. But let me tell a truth, most of the beginners don’t know properly what is happening in cookies and sessions and what is the real use .I have taken so many Interviews but none of them given a good answer. I am very much sure you are going to get a good idea about Sessions and Cookies. Let us start our battle.:)
I am explaining only PHP syntax here. But the concept of Cookies and Sessions are same in all Server Side Languages like ASP.NET, JSP,RUBYetc.except syntax a....!
Answer: <?php $w3 = "mailto:info@w3answers.com"; preg_match('|.*@([^?]*)|', $w3, $w3output); echo $w3output[1]; ?>
....!
a) // b) /* fgfg */ c) All of the above d) First one
ANS: All of the above
....!
Cross-site scripting (XSS) is a security exploit in which the attacker inserts malicious coding into an link that appears to be from a trustworthy source. When someone clicks on the link, the embedded programming is submitted as part of the client's Web request and can execute on the user's computer, typically allowing the attacker to steal information.
Web forms that dynamically return an error message including user input data make it possible for attackers to alter the HTML that controls the behavior of the form and/or the page. Attackers....!
There are two methods
AES_ENCRYPT () and AES_DECRYPT ()
....!
www.w3answers.com
->>> List files and directories inside the specified path ->>> By default files order will be ascending ->>> make $f = scandir($direct, 1); it will display the files as descending order
....!
PHP has a few other functions that can be useful when you're working with WDDX:
<?php $names = array("Andrew", "Emma"); $name2 = "Terry"; $name3 = "Mary"; $name4 = "Thomas"; $wddxpack = wddx_packet_start("PHP-WDDX");
wddx_add_vars($wddxpack, "names");
wddx_add_vars($wddxpack, "name2"); wddx_add_vars($wddxpack, "name3"); wddx_add_vars($wdd....!
www.w3answers.com
w3answers.blogspot.com
<?php
$array=array(5,5,5);
echo $r=array_pad($array,5,2);
?>
Ans:Array
NOTE:
use 'foreach($r as $v)' then try to output value 'echo $v' or use Print_r($r)
so if we make above script as
<?php
$array=array(5,5,5);
$r=array_pad($array,5,2);
foreach($r as $v)
echo $v;
?>
We get the output as 55522
Model-view-controller (MVC) is a design pattern used in software engineering. In complex computer applications that present lots of data to the user, one often wishes to separate data (model) and user interface (view) concerns, so that changes to the user interface do not impact the data handling, and that the data can be reorganized without changing the user interface. The model-view-controller design pattern solves this problem by decoupling data access and business logic from data presentation and user interaction, by introducing an intermediate....!
PEAR PHP Extension and Application Repository
PEAR is the next revolution in PHP. This repository is bringing higher level programming to PHP. PEAR is a framework and distribution system for reusable PHP components. It eases installation by bringing an automated wizard, and packing the strength and experience of PHP users into a nicely organised OOP library.
....!
PEAR PHP Extension and Application Repository
PEAR is the next revolution in PHP. This repository is bringing higher level programming to PHP. PEAR is a framework and distribution system for reusable PHP components. It eases installation by bringing an automated wizard, and packing the strength and experience of PHP users into a nicely organised OOP library.
....!
Recent comments
3 days 13 hours ago
3 days 14 hours ago
1 week 3 days ago
3 weeks 19 hours ago
3 weeks 1 day ago
3 weeks 1 day ago
5 weeks 14 hours ago
5 weeks 17 hours ago
6 weeks 2 days ago
7 weeks 19 hours ago