Open The-Kelvin opened 8 years ago
you are missing the dot in your file name:
try this: include('functions/data.php');
On Tue, Feb 2, 2016 at 2:20 AM, KevTheGeek notifications@github.com wrote:
I get this error after creating the dataphp file and including it in the setup file:
Warning: include_once(functions/dataphp) [functioninclude-once]: failed to open stream: No such file or directory in C:\xampp\htdocs\series\dynamic\AtomCMS\config\setupphp on line 8
Warning: include_once() [functioninclude]: Failed opening 'functions/dataphp' for inclusion (include_path=';\xampp\php\PEAR') in C:\xampp\htdocs\series\dynamic\AtomCMS\config\setupphp on line 8
Fatal error: Call to undefined function data_page() in C:\xampp\htdocs\series\dynamic\AtomCMS\config\setupphp on line 22
This is my setup file:
<?php //Setup File:
Database Connection Here:
$dbc = mysqli_connect('localhost', 'dev', 'regis', 'atomcms') OR die('Could not conect because: 'mysqli_connect_error());
Functions:
include('functions/dataphp');
$site_title = 'AtomCMS 20'; if(isset($_GET['page'])) {
$pageid = $_GET['page']; //Set $pageid is equal to the value given in the url
} else { $pageid = 1; //Set $pageid equal to 1 or the Home Page }
Page setup:
$page = data_page($dbc, $pageid);
?>
dataphp code:
<?php
function data_page($dbc, $id) {
$q = "SELECT * FROM pages WHERE id = $id"; $r = mysqli_query($dbc, $q);
$data = mysqli_fetch_assoc($r);
return $data;
}
?>
Kindly help
— Reply to this email directly or view it on GitHub https://github.com/thedigicraft/Atom.CMS/issues/157.
I get this error after creating the data.php file and including it in the setup file:
Warning: include_once(functions/data.php) [function.include-once]: failed to open stream: No such file or directory in C:\xampp\htdocs\series\dynamic\AtomCMS\config\setup.php on line 8
Warning: include_once() [function.include]: Failed opening 'functions/data.php' for inclusion (include_path='.;\xampp\php\PEAR') in C:\xampp\htdocs\series\dynamic\AtomCMS\config\setup.php on line 8
Fatal error: Call to undefined function data_page() in C:\xampp\htdocs\series\dynamic\AtomCMS\config\setup.php on line 22
This is my setup file:
<?php //Setup File:
Database Connection Here:
$dbc = mysqli_connect('localhost', 'dev', 'regis', 'atomcms') OR die('Could not conect because: '.mysqli_connect_error());
Functions:
include('functions/data.php');
$site_title = 'AtomCMS 2.0'; if(isset($_GET['page'])) {
} else { $pageid = 1; //Set $pageid equal to 1 or the Home Page }
Page setup:
$page = data_page($dbc, $pageid);
?>
data.php code:
<?php
function data_page($dbc, $id) {
}
?>
Kindly help.