Jump to content

Search the Community

Showing results for tags 'syntax-error'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 1 result

  1. I am working from Cockpit CMS and I am trying to create a blog using this tutorial. Directory structure (simplified): +blog -index.php + views -index.php -article.php -index.php +partials -constants.php -top.php blog/index: <?php require_once("../partials/errorlogging.php"); ?> <?php require_once("../partials/constants.php"); ?> <?php require_once("../partials/top.php"); ?> <?php $app = new Lime\App(); // bind routes $app->bind("/", function() use($app) { $posts = collection('blog')->find(["public"=>true])->sort(["created"=>1])->toArray(); return $app->render('views/index.php', ['posts' => $posts]); }); $app->bind("/article/:id", function($params) use($app) { $post = collection('blog')->findOne(["_id"=>$params['id']]); return $app->render('views/article.php', ['post' => $post]); }); $app->run(); ?> <?php require_once("../partials/bottom.php"); ?> blog/views/index.php: <?php require_once("../../partials/errorlogging.php"); ?> <?php require_once("../../partials/constants.php"); ?> <?php require_once("../../partials/top.php"); ?> <?php foreach ($posts as $post): ?> <h2><a href="<?php $this->route('/article/'.$post['_id']);?>"><?php=$post['title'];?></a></h2> <?php endforeach; ?> <?php require_once("../../partials/bottom.php"); ?> blog/views/article.php: <?php require_once("../../partials/errorlogging.php"); ?> <?php require_once("../../partials/constants.php"); ?> <?php require_once("../../partials/top.php"); ?> <h1><?php=$post['title'];?></h1> <p> <?php=$post['content'];?> </p> <?php require_once("../../partials/bottom.php"); ?> Now at the moment if I go to domain.name/blog/ I receive this error: {"type":64,"message":"require_once(): Failed opening required '..\/..\/partials\/errorlogging.php' (include_path='.:\/home\/codio\/.parts\/packages\/php5-apache2\/5.5.15\/lib\/php')","file":"\/home\/codio\/workspace\/blog\/views\/index.php","line":1} However I know for a fact that it is not a problem with the require methods because if I run this code inblog/index.php: <?php require_once("../../partials/errorlogging.php"); ?> <?php require_once("../../partials/constants.php"); ?> <?php require_once("../../partials/top.php"); ?> <?php $app = new Lime\App(); $app->bind("/", function() { return "Hello World!"; }); $app->run(); ?> <?php require_once("../../partials/bottom.php"); ?> There is absolutely no errors on the page or console, and "Hello World" is printed to the screen, so it is to do with the blog/index.php syntax but I have no idea where the problem is...
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.