View previous topic :: View next topic |
Author |
Message |
jolupa -
Joined: 08 May 2003 Posts: 6 Location: Spain
|
Posted: Tue Sep 23, 2003 10:58 pm Post subject: inc files. |
|
|
Hi.
How can i configure Abyss to process the inc files with php?.
I try to make a new file entry in the server configuration exactly as the .php entry, but when i save and restart abyss, the php extension is changed by the .inc file.
HELP! |
|
Back to top |
|
 |
divaone -
Joined: 16 Apr 2003 Posts: 16
|
Posted: Wed Sep 24, 2003 8:46 pm Post subject: Re: inc files. |
|
|
jolupa wrote: | Hi.
How can i configure Abyss to process the inc files with php?.
I try to make a new file entry in the server configuration exactly as the .php entry, but when i save and restart abyss, the php extension is changed by the .inc file.
HELP! |
are any of your simple php scripts working? php includes inc files just the same as ssi include text, html and other files. ive not had to do any configurations for inc files (which can hold anything including plain html). call your inc file like a php file:
<?php include('yourpage.inc'); ?>
<?php include('yourpage.php'); ?>
or from within a script:
include('yourpage.inc');
is this the answer you need?
d1 |
|
Back to top |
|
 |
jolupa -
Joined: 08 May 2003 Posts: 6 Location: Spain
|
Posted: Wed Sep 24, 2003 11:04 pm Post subject: Re: inc files. |
|
|
divaone wrote: |
are any of your simple php scripts working? php includes inc files just the same as ssi include text, html and other files. ive not had to do any configurations for inc files (which can hold anything including plain html). call your inc file like a php file:
<?php include('yourpage.inc'); ?>
<?php include('yourpage.php'); ?>
or from within a script:
include('yourpage.inc');
is this the answer you need?
d1 |
I was reding if someone can access to the .inc files and the server is not set to process this files as PHP, the code is showed like HTML, exposing all the code in it.
And if i can set abyss to process the .inc files like PHP scripts the code is no showed. |
|
Back to top |
|
 |
yalrighty -
Joined: 24 Jun 2003 Posts: 99
|
Posted: Thu Sep 25, 2003 12:57 am Post subject: |
|
|
if you want it to process those files like a php page, just go into your admin console and add .inc to the extentions for php. |
|
Back to top |
|
 |
jolupa -
Joined: 08 May 2003 Posts: 6 Location: Spain
|
Posted: Thu Sep 25, 2003 12:24 pm Post subject: |
|
|
yalrighty wrote: | if you want it to process those files like a php page, just go into your admin console and add .inc to the extentions for php. |
I do that but the extensions for PHP files is deleted and changed for the .inc files, is anyway to implement both files extensions?.
Thanks |
|
Back to top |
|
 |
divaone -
Joined: 16 Apr 2003 Posts: 16
|
Posted: Thu Sep 25, 2003 3:17 pm Post subject: Re: inc files. |
|
|
1: try this first. i think this is more what you mean...
jolupa wrote: | I do that but the extensions for PHP files is deleted and changed for the .inc files, is anyway to implement both files extensions?. |
did you do this under mime types or cgi interpreters? go to cgi interpreters and add all of the following extensions for php: php php3 phtml inc (single spaces in between each).
2:
jolupa wrote: | I was reding if someone can access to the .inc files and the server is not set to process this files as PHP, the code is showed like HTML, exposing all the code in it.
And if i can set abyss to process the .inc files like PHP scripts the code is no showed. |
trying to understand the question better :)
you are able to include inc files inside your php pages and scripts. but if a visitor were to pull up http://localhost/yourpage.inc directly, they would be shown a basic html page (assuming html is what you've put in the inc file) or shown php coding (functions and all). if that visitor right-clicked on the page they would see all the html (or other) coding. you want the inc file to be processed as a php script. is this correct? what parts are incorrect?
if your inc file contains html or similar, place a javascript at the top to redirect if its called alone, just as if a page were called outside its parent frame. if your inc file contains functions, 1) place it in a folder with limited access (?) or 2) change the extension to php so it will run as a script instead.
not sure if this solves your problem but good luck! :D |
|
Back to top |
|
 |
jolupa -
Joined: 08 May 2003 Posts: 6 Location: Spain
|
Posted: Thu Sep 25, 2003 10:11 pm Post subject: Re: inc files. |
|
|
divaone wrote: | 1: try this first. i think this is more what you mean...
did you do this under mime types or cgi interpreters? go to cgi interpreters and add all of the following extensions for php: php php3 phtml inc (single spaces in between each).
2:
trying to understand the question better :)
you are able to include inc files inside your php pages and scripts. but if a visitor were to pull up http://localhost/yourpage.inc directly, they would be shown a basic html page (assuming html is what you've put in the inc file) or shown php coding (functions and all). if that visitor right-clicked on the page they would see all the html (or other) coding. you want the inc file to be processed as a php script. is this correct? what parts are incorrect?
if your inc file contains html or similar, place a javascript at the top to redirect if its called alone, just as if a page were called outside its parent frame. if your inc file contains functions, 1) place it in a folder with limited access (?) or 2) change the extension to php so it will run as a script instead.
not sure if this solves your problem but good luck! :D |
Thank u thats right, i think is more simple to write all the functions and included pages in php.
Thanks for your help :lol: |
|
Back to top |
|
 |
|