06-01-2018, 08:41 AM
Hi,
I am working for three months with userspice and it is great php framework.
I have now one problem: I would like to create an csv (or an pdf) file.
I set up an php file and gave this file access with the page management function.
I have this code in the current userspice 4.3 version:
<pre></pre>
This created an csv file almost like I wanted. The only thing is, that I do have the html code of the header and the navigation in my csv file.
I thought I just had to delete the three 'requiered_once' lines. But then the system does not found my php file anymore.
How can I create a file without the header and navigaton code, but with access control?
Best regards
Thorsten
I am working for three months with userspice and it is great php framework.
I have now one problem: I would like to create an csv (or an pdf) file.
I set up an php file and gave this file access with the page management function.
I have this code in the current userspice 4.3 version:
<pre>
Code:
<?php
require_once '../users/init.php';
require_once $abs_us_root.$us_url_root.'users/includes/header.php';
require_once $abs_us_root.$us_url_root.'users/includes/navigation.php';
if (!securePage($_SERVER['PHP_SELF'])){die();}
header('Content-Type: text/csv; charset=utf-8');
header('Content-Disposition: attachment; filename=data.csv');
// .. here the content
This created an csv file almost like I wanted. The only thing is, that I do have the html code of the header and the navigation in my csv file.
I thought I just had to delete the three 'requiered_once' lines. But then the system does not found my php file anymore.
How can I create a file without the header and navigaton code, but with access control?
Best regards
Thorsten