TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,917
  • Total Topics: 21,308
  • Online today: 884
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 448
  • Total: 448

require inside an article

Started by mrandall131, September 15, 2009, 02:57:42 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

mrandall131

I am working on a front page article to pull info from my gaming script.  Problem is, I need to include my custom subs file.  I get an error in load every time I try and require the file.  What is the proper format for the require inside the article?

For example, my subs file is in ..../public_html/Sources/Battle/Subs-Battle.php

I have tried require_once('Subs-Battle.php') and require_once('..../public_html/Sources/Battle/Subs-Battle.php') to no avail.  Don't think the version is pertinent to this discussion but I am using SMF 1.1.8 and TP version 0.9.8.

Thanks!

JPDeni

I'm assuming that you're using a php article. (I know that should be obvious, but people have tried using php in html articles, so I have to say it. :) )

What is the error?

mrandall131

Yep, PHP article.

Nevermind, in getting multiple test cases, I fixed the problem.  Looks like the default in my case is in the public_html folder and I was missing a folder in my require statement....


ZarPrime

OK then, marked solved. :up:

ZarPrime

This website is proudly hosted on Crocweb Cloud Website Hosting.