![]() |
vBulletin 4 Request - Little help wrapping some PHP with my page style.
I need your help. :o
Ive been trying to wrap the below code with my sites header, footer, style but I keep getting errors. The code below works on the forum root. The page is called cpg_index.php. Any help would be great. Thanks. Code:
<?php |
What error are you receiving?
P.S. Just a heads up that the script you posted is vulnerable to arbitrary file upload, anyone can upload any kind of file to your server, including backdoors which can take over your server and interact with your database in any kind of way you can imagine. |
That sucks. Any way to limit the file types to just images?
--------------- Added [DATE]1500750280[/DATE] at [TIME]1500750280[/TIME] --------------- Well I just tried to upload other file types and all I got was ton of errors. I checked the upload folder and nothing but images. Still Im sure your right and there is a way but maybe if the form was wrapped in a condition to only show to members that would cut down some of the risk. Maybe a captia also... --------------- Added [DATE]1500750798[/DATE] at [TIME]1500750798[/TIME] --------------- And just a thought. Can the code above be tweaked to use on a CMS PSP Page? Ive never tried to use PHP that way I always use it on an external page. Again thanks for the help. |
|
Quote:
Thanks Mark thats actually what Ive been trying to do. Still getting errors. |
I've used the method described in that article many times to create custom pages which include the header/footer and it has always worked very well for me. :D
|
Ive used that method just fine if Im only adding simply html but the trick is getting the PHP to work. Still stuck. Anyone?
|
I generally put the php in the external script, and then have the HTML rendered using a custom template. For example, in my "Profile Reporter" product, I use the following external script to render the custom page:
PHP Code:
HTML Code:
{vb:stylevar htmldoctype} |
Ive been trying that but the multiple instances of opened and closed PHP are screwing me up. I either get Global.php errors or just the form shows up with no formatting.
|
All times are GMT. The time now is 02:35 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|