What is the maximum size of a file that can be uploaded using PHP and how can you change this?
By default, the maximum upload size in PHP is 2MB. This is kept in the php.ini file. To allow for the upload of larger files you have 3 options.
memory_limit = 8M
post_max_size = 8M
upload_max_filesize = 2M
You want to change the upload_max_filesize. Make sure that you don't exceed the post_max_size (if you do, then change them both.) Also, it's a good idea to make sure that memory_limit is always larger than post_max_size. (This applies to all these solutions.)
After making changes to php.ini, your webserver will need to be restarted.
php_flag file_uploads On
php_value memory_limit 8M
php_value post_max_size 8M
php_value upload_max_filesize 2M
You put the .htaccess file in the root web folder, and it will apply to all the folders beneath it. If you do this and the server gives you a HTTP code 500 "Internal Server Error" then you aren't running Apache as a module and you can't do it this way. If it doesn't so anything, it's possible that you don't have the permissions to overwrite the Apache config via .htaccess.
[PHP]
; Whether to allow HTTP file
uploads. file_uploads = On
; Maximum amount of memory a script may consume (8MB)
memory_limit = 8M
; Maximum size of POST data that PHP will accept.
post_max_size = 8M
; Maximum allowed size for uploaded files.
upload_max_filesize = 2M
If that technique fails, then it's time to admit defeat and call your hosting provider or IT guys and ask, politely, that they fix this for you.
What is the name of php compiler?
PHP isn't compiled it is interpreted, however you can cache it and make it much faster by using something like EAccelerator.
How do you get the length of an ANSI string using PHP?
$string ="Guess my length"; $length = strlen($string);
now the $length will have the length of the string.
Who created The Language of PHP?
PHP is the Web development language written by and for Web developers.
PHP stands for PHP: Hypertext Preprocessor. The product was
originally named Personal Home Page Tools, and many people still
think that's what the acronym stands for. But as it expanded in scope,
a new and more appropriate (albeit GNU-ishly recursive) name was
selected by community vote. PHP is currently in its fifth major
rewrite, called PHP5 or just plain PHP.
How do you change 'hElLo WoRlD' to 'HeLlO wOrLd' in PHP?
The process will work similar to a cryptoquip. First, you need to set up a conversion array. Then, run a strtr() and make the conversion into a new string. The code will look something like this:
$input = "hElLo WoRlD";
$convert = array('A' => 'a', 'B' => 'b' ... ... 'Z' => 'z', 'a' => 'A' ... ... 'y' => 'Y', 'z' => 'Z');
$output = strtr($input, $convert);
You can also look into generating the array by other means, such as looking through char codes. It is important to make sure that the array keys are the start letters and the array values are the end letters. It does not matter in what order you populate the array, as long as all letter pairs (upper-to-lower and the other way too) are present.
How do you create a cookie and where will it placed in php?
You can set a cookie using the setcookie() function. You can do this as many times as you wish during your script. Remember that the cookie will not be available to PHP until the next time the page is loaded (or the script is called by a new HTTP request). On the next page, you can access the cookie data from the $_COOKIE super-global array. The key will be the name of the cookie, and the value will be the value you assigned to it the last time you set it.
There's no direct way to do animation in PHP, as it's a server side scripting language. That means that from the browser's point of view, there is no PHP code. It's just a static document that happens to be generated using PHP on the server side. If you want to do animation, you'll need to include client side scripting such as Javascript or Flash (or an animated GIF if something that simple meets your needs).
How do you display message in php?
There are various ways of doing it. Here are a few examples:
printf("Hello world!");
echo "Hello world!";
print "Hello world!";
If you are looking to offer a pop-up message (a separate window with a button that the user must click to acknowledge), you would have to do it with Javascript instead.
mysql_query("UPDATE foo SET bar = bar + 1");
That would be updating the field "bar" in the table "foo", incrementing it's value by 1. Note that for mysql_query to work, you first need to be connected to a database and have a table selected. You can do that using the "mysql_connect" and "mysql_select_db" functions.
A Module in Drupal is an optional plug-in that adds functionality to the core of the Drupal Content Management System (CMS). An example could be one of the many social plug-ins for this open source CMS, which allow you to have the social buttons on your web pages, such as the "like" button or "tweet" button.
There are many modules of varying complexity, some are dependent on other modules, and will require you to install those other modules alongside. The Drupal website has a section where you can search for all kinds of modules and it generally provides a good explanation as to the functionality and compatibility of each module.
It is generally recommended that you install models to the sites/all/modules folder of your Drupal installation, as this keeps your chosen "optional" modules separate from the core installation (which includes modules also) and makes it easier to update the CMS when the time comes.
Modules are installed separately and which one you choose depends on the functionality that you require.
Why do you select the php for doing project?
It depends on personal choice. The reason PHP is used so extensively is probably cause it is platform independent, open-source, syntax is simple, it supports language interoperability through xml & json and a lot of frameworks and cms are available that too free of cost.
Is tuxradar.com a good place to learn php?
Yes, though many other resources exist. The online PHP manual is an excellent example.
How do you call javaScript function inside table?
<table>
<th onclick="checkData()">ID</th>
<th onclick="checkData()">Name</th>
</table>
<script type="text/javascript" language="javascript">
function checkData()
{
// Your Javascript code here
alert("It Works");
}
</script>
What companies use php programming language?
This is a very broad question, many web design companies will make sites in PHP. Facebook for instance is made in PHP, although the have modified it a bit for their massive traffic!
How can you find candidates who knows php?
PHP Programmers are easy to find.
However, like most programmers, you would see them on forums about PHP programming.
Example sites are:
http://sitepoint.com
http://forums.digitalpoint.com
Some programmers can be found browsing the following sites:
http://stackoverflow.com
http://quora.com
So if you want to find programmers you would probably need to advertise on these sites.
For other free options, aside from posting on forums, you would need to join google groups that have PHP programmers as members. A good example of that is the CakePHP group, http://groups.google.com/group/cake-php
How do you make foreign key in wamp server phpadmin?
Normally one goes though a user interface to make a foreign key in a WAMP server. If this doesn't help one might look to a forum directly related to phpadmin issues.
How you can connect two webpage in php?
You can use: require('filename.extension');
Or: include('filename.extension');
What does the function require-once do in php?
PHP maintains four direct functions for bringing in code from other files/sources.
require() and require_once() bring code in from another source and PHP will refuse to run if it cannot load those files.
include() and include_once() bring code in just the same, but your script will continue to run if those files could not be parsed. Thus you would use it if the code is optional and not necessary.
The _once() functions tell PHP to keep a list of required/included files so far and ignore the request if it's already been done somewhere else. Otherwise, it'll parse the file twice and could cause your script to fail because the functions, classes, etc defined during the second load would conflict with those loaded the first time.
PHP Consultant is a Expert PHP Developer who Guide PHP Development Process
People who are suspected of having an intestinal blockage or who suffer from narrowing of the esophagus or any other part of the intestinal tract should not use psyllium.
What is the difference between php and mysql?
A simple answer is that PHP is a language while MYSQL is a software.
PHP
PHP is a interpreted language used mostly for server-side scripting. It uses an interpreter given by PHP.net website used along with apache or anyother server.
It is similar to languages as asp , jsp , python scripts as they nearly perform similar function of serverside scripting.
MYSQL
MYSQL on the other hand is a database server / client (depending upon which one you get)
The MYSQL uses SQL (structured Query Language ) Pronounced as Sequel, To store and retrieve data.
Most developers in web specially php use mysql on server side, but it is not limited to php it can be used along with almost all the languages to store and retrive data.
header() is a php function used to modify and set HTTP headers sent to the browser.