Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Software Development
Programming
Programming Q&A
[PHP Help] File Sections
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="NSA" data-source="post: 230375" data-attributes="member: 10034"><p>Sorry, I'll try and put it a bit better.</p><p></p><p>So right now I have this:</p><p>[PHP]$dir = "tpl/";</p><p>$file = $this->cur_file;</p><p>$ext = ".php";</p><p>$con_file = $dir . $file . $ext;</p><p>if(file_exists($con_file))</p><p>{</p><p> $this->file_html = file_get_contents($con_file);</p><p> echo $this->file_html;</p><p>}[/PHP]</p><p>So $this->cur_file; is equal to whatever $_GET['cur_file']; is set to.</p><p>So if $_GET['cur_file'] = "index"; it would bring index.php from /tpl/ and set $this->file_html; equal to the contents of that file.</p><p></p><p>I then want to be able to separate the head from the body while keeping the current file contents so later on I can then append them to each other.</p><p>Get what I mean?</p></blockquote><p></p>
[QUOTE="NSA, post: 230375, member: 10034"] Sorry, I'll try and put it a bit better. So right now I have this: [PHP]$dir = "tpl/"; $file = $this->cur_file; $ext = ".php"; $con_file = $dir . $file . $ext; if(file_exists($con_file)) { $this->file_html = file_get_contents($con_file); echo $this->file_html; }[/PHP] So $this->cur_file; is equal to whatever $_GET['cur_file']; is set to. So if $_GET['cur_file'] = "index"; it would bring index.php from /tpl/ and set $this->file_html; equal to the contents of that file. I then want to be able to separate the head from the body while keeping the current file contents so later on I can then append them to each other. Get what I mean? [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Software Development
Programming
Programming Q&A
[PHP Help] File Sections
Top