Php include into another php file
-
- Master Bludit
- Posts: 152
- Joined: Wed Jan 29, 2020 8:32 pm
- Has thanked: 27 times
- Been thanked: 10 times
Hi!
I would like to ask how can I call a bludit index.php file installed in a subdirectory?
I try these, but I can only call index.php if it is in the same directory.
What would be a good method for a subdirectory?
<?php include ('index.php'); ?> it works
<?php include ('another/index.php'); ?> it is not
I would like to integrate bludit with another page, but not with iframe.
Thanks.
I would like to ask how can I call a bludit index.php file installed in a subdirectory?
I try these, but I can only call index.php if it is in the same directory.
What would be a good method for a subdirectory?
<?php include ('index.php'); ?> it works
<?php include ('another/index.php'); ?> it is not
I would like to integrate bludit with another page, but not with iframe.
Thanks.
- Edi
- Site Admin
- Posts: 3121
- Joined: Sun Aug 09, 2015 5:01 pm
- Location: Zurich
- Has thanked: 54 times
- Been thanked: 77 times
- Contact:
It depends from the server configuration. You can try to set in the file .htaccess:
Code: Select all
# Base directory
RewriteBase /another/
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
-
- Master Bludit
- Posts: 152
- Joined: Wed Jan 29, 2020 8:32 pm
- Has thanked: 27 times
- Been thanked: 10 times
Hi!
I tried what you recommended, but unfortunately I couldn't solve it.
I get this message: Install Bludit first.
the structure of the website is as follows:
the public_html directory has an index.php this is where the web page starts
this contains the bludit directory and bludit cms starts from the index.php file there
but if I call it in public_html with the include command
<? Php
include ( './ bludit / index.php')
?>)
then I get the message: Install Bludit first
If I provide only one link:
https://etc.com/bludit/index.php
that's fine, but in this case I can't edit it because it doesn't open from a single page
a htacces file it looks like this:
AddDefaultCharset UTF-8
<IfModule mod_rewrite.c>
# Enable rewrite rules
RewriteEngine on
# Base directory
RewriteBase /bludit/
# Deny direct access to the next directories
RewriteRule ^bl-content/(databases|workspaces|pages|tmp)/.*$ - [R=404,L]
# All URL process by index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php [PT,L]
</IfModule>
Based on these, would you still have an idea?
Thanks
I tried what you recommended, but unfortunately I couldn't solve it.
I get this message: Install Bludit first.
the structure of the website is as follows:
the public_html directory has an index.php this is where the web page starts
this contains the bludit directory and bludit cms starts from the index.php file there
but if I call it in public_html with the include command
<? Php
include ( './ bludit / index.php')
?>)
then I get the message: Install Bludit first
If I provide only one link:
https://etc.com/bludit/index.php
that's fine, but in this case I can't edit it because it doesn't open from a single page
a htacces file it looks like this:
AddDefaultCharset UTF-8
<IfModule mod_rewrite.c>
# Enable rewrite rules
RewriteEngine on
# Base directory
RewriteBase /bludit/
# Deny direct access to the next directories
RewriteRule ^bl-content/(databases|workspaces|pages|tmp)/.*$ - [R=404,L]
# All URL process by index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php [PT,L]
</IfModule>
Based on these, would you still have an idea?
Thanks