CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 PHP with templates

Print topic Send  topic

Author Message
lquental

Posts: 15
Posted: 01/19/2004, 1:08 PM

Hello,

I'm quite new to CCS, so I have a question:

Is there a way to use PHP without templates? The templates don't bother me at all, and I understand their usage. The problem is when I publish my project on my hosting server and I type my domain "www.mydomain.com" I see the template file and not the php file, it only works if I type "www.domain.com/index.php".

I know this probably is a Apache issue, but is there anyway to solve this with CCS?

Thanks in advance for any help,

Luis
View profile  Send private message
Don Safar
Posted: 01/19/2004, 2:02 PM

Put an .htaccess file in the root directory of your website that has the
following line of information in it.

DirectoryIndex index.php index.html

This tells apache to look for index.php first then index.html.


"lquental" <lquental@forum.codecharge> wrote in message
news:5400c474a34c17@news.codecharge.com...
> Hello,
>
> I'm quite new to CCS, so I have a question:
>
> Is there a way to use PHP without templates? The templates don't bother me
at all, and I understand their usage. The problem is when I publish my
project on my hosting server and I type my domain "www.mydomain.com" I see
the template file and not the php file, it only works if I type
"www.domain.com/index.php".
>
> I know this probably is a Apache issue, but is there anyway to solve this
with CCS?
>
> Thanks in advance for any help,
>
> Luis
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

peterr


Posts: 5971
Posted: 01/19/2004, 2:57 PM

BTW, if this is not your server and you are not allowed to configure it, then possibly you can use these "tricks":
1. Rename your page to "mainpage.php" in CCS.
Then manually create PHP page "index.php" (without .html template) that will redirect users to "mainpage.php".

2. Alternatively, you may be able to use your current index.php page , but put some JavaScript in your "index.html" that will check the current URL and if it contains "index.html" then redirect the users to "index.php".
Unfortunately I am not a JavaScript guru and possibly someone else here may offer a sample code.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
Sixto Luis Santos
Posted: 01/19/2004, 4:13 PM

What I usually do is rename my "index" page to "start" or "home", then
create an index.php file with:
<?PHP
header("Location: start.php");
?>

or
header("Location: home.php")
if that happens to be your home page.

But first try Don's suggestion of creating or changing .htaccess.

Regards,

Sixto

"lquental" <lquental@forum.codecharge> wrote in message
news:5400c474a34c17@news.codecharge.com...
> Hello,
>
> I'm quite new to CCS, so I have a question:
>
> Is there a way to use PHP without templates? The templates don't bother me
at all, and I understand their usage. The problem is when I publish my
project on my hosting server and I type my domain "www.mydomain.com" I see
the template file and not the php file, it only works if I type
"www.domain.com/index.php".
>
> I know this probably is a Apache issue, but is there anyway to solve this
with CCS?
>
> Thanks in advance for any help,
>
> Luis
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

lvalverdeb

Posts: 299
Posted: 01/20/2004, 6:26 AM

Yet another way: open the index.html and add the following code:

<html>
<script language="javascript">
window.location="yourmainpage.php"
</script>
</html>

Luis
_________________
lvalverdeb
CR, GMT-6
XAMPP/Ubuntu/CCS3.2/4
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright 2003-2004 by UltraApps.com  and YesSoftware, Inc.