<?php $file_rimg = fopen("http://w3answers /image23.jpg",'rb'); $newfile_name_img = "/tmp/tutorial.file"; $file_wnew = fopen($newfile_name_img,'wb'); while (!feof($file_rimg)) { $chunk_rd = fread($file_rimg,1024); fwrite($file_wnew,$chunk_rd); } fclose($file_wnew); fclose(file_rimg); ?>
www.w3answers.com
....!
a) Solid & oracle b) mysql c) None of the above d) All of the above
All of the above
....!
Calculate the md5 hash of a string. The hash is a 32-character hexadecimal number.
....!
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.
....!
A. Yes, but not without sending another HTTP request.B. Yes, because PHP executes before JavaScript.C. No, because JavaScript is server-side, and PHP is client-side.D. No, because JavaScript executes before PHP.
Answer A is correct.
Although your instincts might lead you to believe that youcannot pass data from JavaScript to PHP, such a thing can be achieved with anotherHTTP request. Answer B is incorrect because PHP executing before JavaScriptis not what makes this possible.This is actually the cha....!
....!
The syntex for repairing a mysql table is
REPAIR TABLENAME, [TABLENAME, ], [Quick],[Extended]
This command will repair the table specified
if the quick is given the mysql will do a repair of only the index tree if the extended is given it will create index row by row
....!
<?php
ob_start(); // start an output buffer
echo ‘This text is from the w3answers buffer*******<br />’; // output that will be stored in the buffer
$w3buffer = ob_get_contents(); // store buffer content in $w3buffer variable
ob_end_clean(); // stop and clean the output buffer
echo ‘This is not from the w3answers buffer!!!!!!!!<br />’;
echo $w3buffer;
?>
O/p
$stringOfText = "<p>This is a test</p>";
$expression = "/<(.*?)>(.*?)<\/(.*?)>/";
echo preg_replace($expression, "\\2", $stringOfText);
....!
***************************** ASP Arrays to PHP *****************************
WDDX also allows more-complicated data structures to be passed between applications. Here we will pass an array from an ASP WDDX script to a PHP script.
An ASP Script to Serialize an Array into a WDDX Packet <%
'define data as ASP array dim names names = Array("Andrew", "Emma", "Terry", "Mary", "Thomas")
set wddxob = Server.....!
Mainly there are three ways
The first method is to use PHP as a CGI "wrapper". When run this way, an instance of the PHP interpreter is created and destroyed for every page request (for a PHP page) to your web server. Because it is destroyed after every request, any resources that it acquires (such as a link to an SQL database server) are closed when it is destroyed. In this case, you do not gain anything from trying to use persistent connect....!
Exceptions
PHP 5 has an exception model similar to that of other programming languages. An exception can be thrown, try and caught within PHP. A Try block must include at least one catch block. Multiple catch blocks can be used to catch different classtypes; execution will continue after that last catch block defined in sequence. Exceptions can be thrown within catch blocks.
When an exception is thrown, code following the statement will not be executed and PHP will attempt to find the first matching catch block. ....!
Memcache is a technology which caches objects in memory where your web application can get to them really fast. It is used by sites such as Digg.com, Facebook.com and NowPublic.com and is widely recognized as an essential ingredient in scaling any LAMP application to handle enormous traffic.
....!
<?php echo "www.w3answers.com"; if ((string)'-1') { print 'ouch'; } else { print 'echo'; } ?>
a. ouch b. echo c. none d. Parse error
ANS: 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....!
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....!
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