Jump to content
xisto Community
ThoaiOnline

Tell Me Where To Begin php

Recommended Posts

Go to http://php.net/ as Avalon saud and start read all the documents you can..then create some basic scripts and donwload a nukk(php-nuke for example) reading the source of the nuke you can understand better the OO(Object oriented) programming, in fact i think on the site(php.net) they don't explain very well this kind of approach to the programming..'njoy

Share this post


Link to post
Share on other sites

Assuming you have mastered HTML, PHP wont be too steep for you. Books are often very much useful, but if dont have any of them, online resources will do. Google is there to search for you....you could start reading articles about php from websites like http://www.w3schools.com/ or any of other sites listed on Google search results.

PHP is a flexible language. On a PHP enabled server, altering an HTML document, to a .PHP wont change how the page will look like. PHP can be integrated into websites by simply opening and closing tags (ie. <? and ?>). Everything outside the tags is treated normally. You could start discovering about it maybe by downloading some PHP scripts and see for your self your this PHP scripts work.

Share this post


Link to post
Share on other sites

You can start php script with "<?" in file not save with "html" or "htm" extension.If you intend to use php script with file save with "html" or "htm" extension, your php script will have to start with "<?php".If php script start with "<?" and resulted in plain text then start your php script with "<?php" and all php script end with "?>".:)

Share this post


Link to post
Share on other sites

You can start php script with "<?" in file not save with "html" or "htm" extension.

If you intend to use php script with file save with "html" or "htm" extension, your php script will have to start with "<?php".

 

If php script start with "<?" and resulted in plain text then start your php script with "<?php" and all php script end with "?>".

 

:)

<{POST_SNAPBACK}>


in apache web server, php files are only parsed by PHP engine if only you use this setting in httpd.conf;

 

AddType application/x-httpd-php .php

if you want all the html files to be parsed by PHP engine, then you should add the line;

 

AddType application/x-httpd-php .html

but doing this will increase the resource consumption in server because all the html files will be processed by PHP engine eventhough they dont contain any php scripting.

 

secondly, those "<?" are short open tags. you can enable the use of it by having this in php setting, php.ini file;

 

short_open_tag = On

otherwise, only php code within "<?php" and "?>" are only recoqnized by php engine

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.