PDA

View Full Version : Php Is It Like C++?



ooo
09-25-2003, 12:06 PM
i know html and i wanted to start making polls and forums for my site... i downloaded the zip file for invision board forum but i didnt have a clue what to do lol... so im thinking of learning some pHp... is it simlar to c++? since i know basic c++ and is there any sites that i can download an ebook for it?

mogadishu
09-25-2003, 12:30 PM
php is for web design, database stuff. c++ is for writing programs. Im pretty sure.

4play
09-25-2003, 03:07 PM
php is a server side scripting language which in plain english means it is a set of commands that are run on the server and the user will only ever see the results.

c++ is a mainly compiled language ( i have seen an interperater out there which was very cool).

http://www.w3schools.com/ this is a great site and has to notch tutorials on all web based languages. B)

Amarjit
09-25-2003, 04:09 PM
PHP and SQL is installed on your server and it basically generates HTML, this can include the form of creating HTML pages on demand, much like a forum operates. Together with SQL - a database engine - you can miinipulate data powerfully with polls, guestbooks etc.. C++ is a programming-language that allows you to make applications, but most frequently Win32 applications.

shn
09-25-2003, 04:32 PM
Originally posted by Amarjit@25 September 2003 - 10:09
PHP and SQL is installed on your server and it basically generates HTML, this can include the form of creating HTML pages on demand, much like a forum operates. Together with SQL - a database engine - you can miinipulate data powerfully with polls, guestbooks etc.. C++ is a programming-language that allows you to make applications, but most frequently Win32 applications.
False.

It does not generate html. Why would php generate html? That doesnt make sense. Thats like saying C++ generates C. <_<

All php does is generates dynamic web content. Its great for content management systems like postnuke and phpnuke.

You dont need to know anything about php in order to install a php powered forum or cms (content management site) site. All you have to do is read the instructions for the board. What you do with invision board is edit a config file and put in the address of your sql server, the username and the password and other simple info. Basically after you edit it you go to your site and run the install script, it may be something like

http://localhost/bb/install.php or something.

And besides php cms and forums, you can have a php powered site without using a database server. But a lot of times a database server is more convenient and will be required for the most part.

Also php is a bit like asp. They are both kind of in a war right now, sort of like apache and IIS. But we all know who wins that one. :lol:

Amarjit
09-25-2003, 05:00 PM
That&#39;s what someone told me at Expert-Exchange when I was a novice at HTML/PHP etc..

shn
09-25-2003, 05:17 PM
Originally posted by Amarjit@25 September 2003 - 11:00
That&#39;s what someone told me at Expert-Exchange when I was a novice at HTML/PHP etc..
Well you better go hunt them down and smack em.
http://www.smacksportswear.com/discountbuys/tshirts/images/tshirtpicture.jpg


No really though Im just kidding. I think you may have just worded it wrong. For the most part its pretty correct except the php generates html pages part. :)

Johnny_B
09-25-2003, 05:47 PM
Like shn said, you don&#39;t need to know anything about php in order to put up a forum. ;)
Go here (http://tutorials.forum-forum.com/ipb/) for an installation tutorial about invision board.
You can also try their forums for more information, here (http://forums.invisionpower.com).

But I still think you would be much better off with phpBB (http://www.phpbb.com). ;)

ooo
09-26-2003, 12:56 AM
heh umm looking at phpbb... looks nice... what i didnt get about the invisionboard thing was the port 777 or whatever... it said you have to change it, so you dont get access denied or something...

and i was trying to work a poll and a guestbook which was in php...

Cl1mh4224rd
09-26-2003, 05:04 AM
CHMOD 777

&#39;CHMOD&#39; is a Unix/Linux command that sets access permissions on files and directories.

shn
09-26-2003, 05:10 AM
Originally posted by Cl1mh4224rd@25 September 2003 - 23:04
CHMOD 777

&#39;CHMOD&#39; is a Unix/Linux command that sets access permissions on files and directories.
theycould be using windows with php.

In that case they would have to allow permissions to the internet guest account or whatever its called so that its writable when they run the web based installer for the forum.

evilbagpuss
09-26-2003, 12:14 PM
Originally posted by shn
False.

It does not generate html. Why would php generate html? That doesnt make sense. Thats like saying C++ generates C.&nbsp;


Your wrong.

PHP can and usually does produce HTML via echo. This is the "dynamic web content" you mentioned.

Here is part of a script from the open source edge engine to prove it.



echo &#34;&#60;p&#62;&#60;table border=0 cellpadding=1 cellspacing=1 width=80%&#62;&#34;;
echo &#34;&#60;tr&#62;&#60;td&#62;&nbsp;&#60;/td&#62;&#60;td class=edgesmall colspan=3&#62;&#34;.flecho&#40;&#34;most discussed topics for last &#036;edge_boardmostdisc days&#34;,&#036;es_mostdisct&#41;.&#34;&#60;/td&#62;&#60;/tr&#62;&#34;;
echo &#34;&#60;tr&#62;&#60;td&#62;&#60;/td&#62;
&nbsp;&#60;td class=edgesmall bgcolor=&#036;wb_table_bg&#62;&#34;.flecho&#40;&#39;subject&#39;,&#036;es_subject&#41;.&#34;&#60;/td&#62;
&#60;td class=edgesmall bgcolor=&#036;wb_table_bg&#62;&#34;.flecho&#40;&#39;author&#39;,&#036;es_author&#41;.&#34;&#60;/td&#62;
&#60;td class=edgesmall &nbsp;bgcolor=&#036;wb_table_bg&#62;&#34;.flecho&#40;&#39;nr. of posts&#39;,&#036;es_nrofposts&#41;.&#34;&#60;/td&#62;&#60;/tr&#62;&#34;;

Icey
09-26-2003, 12:23 PM
:blink:

DWk
09-26-2003, 01:03 PM
goin back to the topic in question.... him askin "PHP is it like C++?"....

well not like C++....more like C alone.... they say that if u know C, u know 90% php....so gl :D

DWk

evilbagpuss
09-26-2003, 01:12 PM
Originally posted by dwk
well not like C++....more like C alone.... they say that if u know C, u know 90% php....so gl

Kind of...

PHP is similar to C in the respect that it uses the 3 basic elements of procedural programming. Sequence, selection and iteration. But then again... so do most procedural languages.

PHP is more similar to Perl because they&#39;re both interpreted languages that require an interpreter to run the scripts, whereas C is a compiled language.

Perl is also used to dynamically create HTML as well.

ooo
09-27-2003, 12:43 AM
umm im confused how to install this board...

http://www.phpbb.com/

http://www.toon-network.com/soul/phpBB2/install/install.php

im confused on what to do...

shn
09-27-2003, 06:53 PM
Originally posted by evilbagpuss+26 September 2003 - 06:14--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td>QUOTE (evilbagpuss @ 26 September 2003 - 06:14)</td></tr><tr><td id='QUOTE'> <!--QuoteBegin-shn
False.

It does not generate html. Why would php generate html? That doesnt make sense. Thats like saying C++ generates C.&nbsp;


Your wrong.

PHP can and usually does produce HTML via echo. This is the "dynamic web content" you mentioned.

Here is part of a script from the open source edge engine to prove it.



echo &#34;&#60;p&#62;&#60;table border=0 cellpadding=1 cellspacing=1 width=80%&#62;&#34;;
echo &#34;&#60;tr&#62;&#60;td&#62;&nbsp;&#60;/td&#62;&#60;td class=edgesmall colspan=3&#62;&#34;.flecho&#40;&#34;most discussed topics for last &#036;edge_boardmostdisc days&#34;,&#036;es_mostdisct&#41;.&#34;&#60;/td&#62;&#60;/tr&#62;&#34;;
echo &#34;&#60;tr&#62;&#60;td&#62;&#60;/td&#62;
&nbsp;&#60;td class=edgesmall bgcolor=&#036;wb_table_bg&#62;&#34;.flecho&#40;&#39;subject&#39;,&#036;es_subject&#41;.&#34;&#60;/td&#62;
&#60;td class=edgesmall bgcolor=&#036;wb_table_bg&#62;&#34;.flecho&#40;&#39;author&#39;,&#036;es_author&#41;.&#34;&#60;/td&#62;
&#60;td class=edgesmall &nbsp;bgcolor=&#036;wb_table_bg&#62;&#34;.flecho&#40;&#39;nr. of posts&#39;,&#036;es_nrofposts&#41;.&#34;&#60;/td&#62;&#60;/tr&#62;&#34;;
[/b][/quote]
Dont contradict me on something as mediocre as that.

Their two different languages. If your going to use php to generate html then you might as well just use html anyway because you can have dynamic html web content without using php. Its frivilous to even attempt to use the method you posted because all it does is defeats the purpose and makes the process of generating dynamic content an unnecessary hassle.

By the way, going on google and copying and pasting code on the board is not going to prove your point, especially when have no idea what your referring to yourself. <_<

ooo
09-27-2003, 07:07 PM
alrite i got the board workin my friend told me that he was alloweed to create those board w/out having to dl it and install it

wow theres still arguing lol

Johnny_B
09-27-2003, 07:09 PM
Originally posted by Soul814@27 September 2003 - 00:43
umm im confused how to install this board...

http://www.phpbb.com/

http://www.toon-network.com/soul/phpBB2/install/install.php

im confused on what to do...
Good to see that you prefer phpbb the best. :D

Check out these links:

Step by step installation instructions (http://www.phpbb.com/kb/article.php?article_id=6)

phpBB 2.0.4 install guide (http://www.phpbb.com/phpBB/docs/INSTALL.html)

Information and notices (http://www.phpbb.com/kb/article.php?article_id=24)

phpBB Users guide (http://www.phpbb.com/guide/phpBB_Users_Guide.html)

Wolfmight
09-27-2003, 09:06 PM
seems like a more advanced kind of html.. like xml

Ynhockey
09-27-2003, 10:37 PM
@Shn

Actually, PHP is used to generate HTML via echo and such... for example, you make a login script, if someone logs in with the right un/pass, you can echo a message that the user has logged in and do whatever else (such as assign stuff to a session, etc.), while if the user entered the wrong password or something, you can echo a nice &#39;fuck off&#39; message... Also PHP can generate files with fopen, fwrite, etc. (like in C)

But I admin, PHP&#39;s whole point isn&#39;t to generate HTML, it&#39;s to generate HTML according to what a user does - there&#39;s a difference.

As for PHPBB, it&#39;s easy to install, just follow the instructions provided, then completely delete the install directory. Can you tell exactly where you&#39;re having a problem ?