php question


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting php question
# 1  
Old 04-14-2005
php question

Hi all

I am trying to learn php and have been given a set of files to play around with. Most have regular .php suffix but some have .api.php suffix. Can anyone explain the difference(if any) or relationship between the two. Are the .api.php files some sort of module. As a complete php newbie I would be grateful for any help given

many thanks
# 2  
Old 04-15-2005
Hi !
The filename is not important. As long as it has an .php termination, the web server will detect it as a page with PHP code. file.api.php I don't know why the file is named like this, but probably it's just something what has to do with the programmer's own style to give names to the files. For example, I use small files that I include in my pages. Usualy, the file is something like header.inc, but this file will be readable by anyone who is viewing the file... so I rename the file as header.inc.php, so when someone try to see the file, all the variables and PHP code will be "snipped" out from the page.
So, as I sayd, .api.php is just a file like any other file. It's just the programmer's way to name that file, probably to remember him that there are some classes or something that may be included in his .php file...
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

PHP Labeling/Punctuation Syntax Question

Greetings! My first PHP question; and, no doubt, a "no-brainer" for the initiated :) The question centers around the proper syntax for input field labeling. The snippet which puzzles me (and the candidate which I wish to modify) goes like this:<?php _e('Hello World'); ?>:<br />What I'd like... (0 Replies)
Discussion started by: LinQ
0 Replies

2. Programming

Generic speed question (PHP vs.)

Hi, On a hosted linux environment which I have very little control over, I have a PHP script that takes in X number of floats, performs Y number of simple recursive arithmetic calculations, and produces some output for display to the user. When I first created the script, 'X' and 'Y' were... (4 Replies)
Discussion started by: MoreCowbell
4 Replies

3. Programming

My first post (Probably a really dumb php question)

Ok so I'm new on here and new to php scripting.. I'm taking over a script that was managed by someone else and I'm trying to figure out how I can add code that looks for two conditions that would be an exception to the code below.. $colred = 0; if(stristr($result, "containsthis")) { $colred =... (2 Replies)
Discussion started by: gmcpheden
2 Replies

4. Shell Programming and Scripting

Newbie Question: What is php shell scripting?

I know php is a Web Development language but what does it have to do with shell scripting. I might be wrong about php. Is there a CLI? How do I make one and how does it work? Please don't answer these if you have any books on this. Please give names of good beginner books for php shell scripting... (3 Replies)
Discussion started by: orszhak
3 Replies

5. Shell Programming and Scripting

PHP quote question

I have a problem, I can't find the answer. I have the following code: while($row = mysql_fetch_array($sql)) { $newtime = $row; $octet = $row; echo "$dataSet->addPoint(new Point(\"$newtime\", \"$octet\"));"; } I need the result of $dataSet->addPoint(new Point("2010-11-14",... (2 Replies)
Discussion started by: mrlayance
2 Replies

6. Solaris

Compile php with curl on solaris 10 question

I have curl compiled into /usr/local. I needed to install another version into /usr/local/curl-7.19.5 and compile php using that directory. I believe I had done that but an ldd run against php shows it is using /usr/local/lib. I have my configure script below showing how it was built and php -i... (1 Reply)
Discussion started by: csgonan
1 Replies

7. Shell Programming and Scripting

php http exploit method - pbsync hack question

I'm dealing with a website that was recently blocked by the webhost because pbsync was found on the server. I'd like for someone to give me 'a tutorial' if you will or guidance on how they are able to accomplish the below scenario.. index.php consist primarily of these tables with the following... (2 Replies)
Discussion started by: phpfreak
2 Replies

8. Shell Programming and Scripting

lame php question

When do PHP variables/objects vanish? Say, I have a database structure in index.php, I called connect(). Then I sent the user another page, say index2.php. Should I create a fresh database structure and call connect() again, or is there a way around this? (6 Replies)
Discussion started by: rayne
6 Replies

9. UNIX for Dummies Questions & Answers

php config question (on unix)

i received the following error when trying to update the server to php 4.1.2... Internal Server Configuration Error Syntax error on line 58 of /usr/local/etc/httpd/conf/httpd.conf: Cannot load /usr/local/etc/httpd/modules/mod_php4-4.1.2-module-mysql-imap.so into server:... (1 Reply)
Discussion started by: bikr
1 Replies
Login or Register to Ask a Question