BuckshotPlusPlus
  • 🤝Getting started
    • What is BuckShotPlusPlus?
    • Install
  • 📺Video tutorials
    • Getting started with bpp
    • How to use reusable components
    • How to use events
  • 👔Data types
    • Variables
    • Arrays
    • View
    • Data
    • Page
    • Event
  • 🤓The basics
    • Comments
    • Include
    • String concatenation
    • Conditions
    • Sessions
    • Static site export
  • 🔍SEO
    • Sitemap.xml
    • Meta tags
  • Advanced use
    • CSS Properties
Powered by GitBook
On this page
  • Local includes
  • Network includes
  • Use cases
  • Important notes

Was this helpful?

Export as PDF
  1. The basics

Include

Learn how includes works in BuckShotPlusPlus

PreviousCommentsNextString concatenation

Last updated 1 year ago

Was this helpful?

In , the include directive allows you to incorporate external (bpp) files into your main project. This is particularly useful for modularizing your code, reusing components, or importing libraries and frameworks.

Local includes

If you have separate bpp files within your project directory or on your local machine, you can include them using the include directive followed by the relative path to the file. This allows you to split your code into multiple files for better organization and maintainability.

Here's how you can include a local bpp file:

include "local/path/to/your/file.bpp"

Network includes

also supports including bpp files hosted online. This is especially useful when you want to use a library or framework that's hosted on a server or when collaborating with others. To include a network-based bpp file, use the include directive followed by the full HTTPS URL of the file.

Here's an example:

include "https://link_to_your_bpp_file"

Use cases

  1. Code Modularization: By splitting your code into multiple files and using the include directive, you can create a more organized and modular codebase.

  2. Library and Framework Integration: Easily integrate external libraries or frameworks hosted online into your project.

  3. Collaboration: If you're working with a team, you can host shared components online and include them in multiple projects.

Important notes

  • Always ensure that the path or URL you provide in the include directive is correct to avoid errors.

  • Be cautious when including external files, especially from untrusted sources, to ensure the security and integrity of your project.

  • Regularly update the included files, especially if they are libraries or frameworks, to benefit from bug fixes and new features.

🤓
BuckshotPlusPlus
BuckshotPlusPlus
BuckshotPlusPlus
BuckshotPlusPlus