How to Create PHP Files?

Chat about anything not covered in these forums, but keep it civil!

Post » Wed Oct 01, 2014 6:06 pm

I Know how code a bit but where should I put the code to export it to .php file?
I used microsoft office word but it exported to .htm (which is useless since php needs .php file to execute code in HTML).
Thanks in advance.
ImageImageImageImageImage
B
54
S
15
G
5
Posts: 852
Reputation: 11,346

Post » Wed Oct 01, 2014 6:20 pm

copy and paste into notepad and save as yourfile.php or just change the .htm to .php (but office usually puts all sorts of junk into the file). Just copy to notepad. Even better download notepad++ I made many, many many websites with it.
You think you can do these things, but you can't, Nemo!
Just keep reading.
Just keep learning.
B
65
S
16
G
9
Posts: 1,429
Reputation: 12,708

Post » Wed Oct 01, 2014 6:26 pm

Naji wrote:I Know how code a bit but where should I put the code to export it to .php file?
I used microsoft office word but it exported to .htm (which is useless since php needs .php file to execute code in HTML).
Thanks in advance.


Wait, what? You do not want to use Microsoft word to write PHP code. I recommend looking into the following IDES: Komodo Edit, Sublime Text, Notepad++, or Eclipse, you may benefit from following along with a brief tutorial on building websites with PHP as well.

The extension of the file matters less than the program that "opens" it. You could create a file named index.html that executes PHP code using htaccess or apache config.
Developing Surolace, the survival role playing space game.

surolace-survival-role-playing-space-game_t116953
B
13
S
4
Posts: 303
Reputation: 1,705

Post » Wed Oct 01, 2014 7:02 pm

@Naji you don't have to create multiple thread to discuss similar thing, you just made information on one topic to be patchy and too dispersed. Next time, just change the topic title by adding up sentence you want to make the whole thread relevant.

On topic.
@skelooth do you know any tools that makes PHP more approachable by a code-syntax-blind person like me? Some sort of similar in terms of easiness of using event system in C2.
B
28
S
8
G
4
Posts: 553
Reputation: 4,914

Post » Wed Oct 01, 2014 7:18 pm

Eclipse might be the closest you can come, but PHP is a programming language. It's really not much different than C2. C2 is just a visual programming language.

In C2 you might put something like

[Button click] - > set text

in PHP you might write something like

if ( $clicked == true ) { $something= "newtext"; }

Eclipse would help with syntax completion, but most editors do that. They lie when they say C2 isn't programming. It's just visual ;) you are a programmer and didn't even know it.
Developing Surolace, the survival role playing space game.

surolace-survival-role-playing-space-game_t116953
B
13
S
4
Posts: 303
Reputation: 1,705

Post » Wed Oct 01, 2014 7:37 pm

Weird thing is, if you give me a PHP file, I totally can read it and understand it, same goes with the javascript generated by C2. But when it comes to write one, it's always the syntax that keep me down... It seems my brain is farting whenever I see syntax symbol like {"==$ etc. I was hoping that I can program it without seeing the syntax, anyway I'll look up eclipse tomorrow, see whether does it help me or not.

http://www.eclipse.org/
Is this the correct eclipse you're talking about?
B
28
S
8
G
4
Posts: 553
Reputation: 4,914

Post » Wed Oct 01, 2014 8:24 pm

Yes tha is the correct link...Eclipse is really good, check out aptana studio as well. Both are really good. I favor aptana, in fact eclipse lead me to aptana, but can't fault eclipse. Both are really great.
You think you can do these things, but you can't, Nemo!
Just keep reading.
Just keep learning.
B
65
S
16
G
9
Posts: 1,429
Reputation: 12,708


Return to Open Topic

Who is online

Users browsing this forum: lachie346 and 1 guest