PDA

View Full Version : Learning PHP


Anita
05-24-2001, 06:36 PM
Hello All,

I am very new to PHP.[nbsp][nbsp]My first problem is a very basic one.[nbsp][nbsp]I have written 3 php pages with a .php extension.[nbsp][nbsp]When I attempt to upload them to the server, I don't get an error message but the files are ignored.[nbsp][nbsp]I did read through a tutorial on uploading with PHP3 but am not certain that this is the same problem.[nbsp][nbsp]My questions:

1.[nbsp][nbsp]Should my php files go to a temp directory that is globally writable (777).

2.[nbsp][nbsp]Is this going to be the norm with php files and running them through web pages?

3.[nbsp][nbsp]If I am using headers and footers within my html pages, I am confused about using the php extension on the index page.[nbsp][nbsp]My understanding from my reading and the many tutorials I have taken is that I shoud be able to embed the code right into my html pages and use the html extension.[nbsp][nbsp]What is correct procedure for naming files?[nbsp][nbsp]I know which ones need the php extension, I needto clarify the html pages.

Just a point of clarification.[nbsp][nbsp]I am learning MySQl and PHP as well as trying to integrate the two all at once and I think I have too much information to process.

Thank you in advance for any assistance you can provide.

Anita

herc
05-28-2001, 06:52 AM
Hi,

1. PHP was written specifically for the web and as such does not need special directories ala perl and other CGI scripting languages.

2. No - see 1 above. You only need write access for a file you are going to write to. well actually[nbsp][nbsp]I usually use 644 (owner write) such that i can overwrite it from my ftp program without no permission errors.

3. In fact you do not have to have a php extension for a php file .. you can set up apache such that the extension can be .HTML. or .whatever. I would suggest though use .php especially for include files like headers or footers or configuration files with a password in .. if you need more of an explanation about why just ask.

Hope this helps


------------------