I'm cobbling together a simple website in Bootstrap 3 to serve files on an isolated LAN, I'm not a web developer by trade so apologies if this is a bit of a stupid question:
Is there an easy way to have a webpage dynamically populate with files from a given directory?
For instance, if I just dumped a load of files in /var/www/downloads/, could I have them appear as links in a <ul> on a page?
I know something like this could be written in PHP or I could get people to connect to an FTP service, just wondering if such a solution already exists.
Related
I am making a SEO project using PHP where I need to crawl every pages/directories of a website. But for this, I have to know or list all the directories of that website. Is it possible?
Can we do it with PHP?
No. HTTP provides no way for a client (regardless of the programming language it is written in) to ask for directory listings.
This is why search engines crawl links and make use of sitemaps.
A PHP program could inspect the directory structure of the file system of the computer it is running on, but even that wouldn't give you a good view in the general case as most websites are not simply a bunch of files served up by mapping URLs directly onto a filesystem (for example, the Front Controller design pattern is quite common).
I'm working on a project on localhost. Its kind of a company management application based on some php framework. Basically I'm a front-end developer and I've to fix some pages, their alignments and color scheme. I'm using firefox. Every single time when I've to change the settings of any page I've to go the php dev who built the app and they located file for me in the project, obviously they knew the file structure of the whole project. So is there any possible way, tool, addon or plugin that can identify the specific file (which is currently open in my browser) for me? so that I can reach the file on localhost directly and edit it right away rather than bothering the php developers all the time. Firefox inspect element can identify the css files though. Any help would be appreciated. Thanks
I'm trying to integrate a web conferencing tool, called Big Blue Button into my drupal website. I have downloaded a php script that will allow integration between my site and the Big Blue Button API.
In the readme, it says 'stick the entire directory into somewhere that can host php'. So the directory includes, for example, 'index.php', 'assets', 'css' and a few other files. So were do I put this and how can I access this Big Blue Button from a new page on my website? In my drupal folder, I have lots of different folders such as 'modules', 'profiles', 'sites' etc.
Can anyone help me to get this working?
Thanks
I would advise you to do it the Drupal way, i.e., create a custom module. If you're developing with Drupal, you may as well learn to do this.
You will find a lot of free Drupal tutorials here:
http://codekarate.com/daily-dose-of-drupal
Creating a single page is fairly easy. You will need to look at hook_menu. Download the examples module and look at the Menu examples go create a simple page.
Create a subfolder in your custom module to hold the Big Blue Button files and try calling your php script from your menu callback function.
If you've never done this sort of thing, it may seem daunting at first, but have a try & you will find out it's not that difficult.
I would first try putting the entire folder on the same level as the Drupal folder, not within.
you need to create a page w/in Drupal and then link to the index.php of the tool.
That's the kind of thing I have done before, though not with this specific tool... in other words, I just used an iframe to pull it in. That or I've just opened it up in another window.
Integrating actually 'within' Drupal would take more and be creating a custom module which, judging from your question is probably more than you want or can do at this moment.
Try pulling it into an iframe... or possibly loading that index.php into a div via jquery using load().....there may be a newer method but have a look.
Whilst I am familiar with HTML, CSS, SQL and some Javascript, I know nothing about PHP and my hours of searching on the Internet just takes me to tutorials which show me how to build PHP scripts from scratch, which is not helping me. I am not sure I entirely understand the concepts I am dealing with but I will try and explain as best I can.
I have been given a local copy of a database (developed by somebody else who for logistical reasons I cannot contact at the moment) in MySQL, on an Apache Tomcat server and utilising PHP which was developed in CakePHP and so has several templates from CakePHP. These are all running through Wampserver. The database 'BuddyMe' contains 3 tables - User, Roles and Business Units - and there are corresponding Views using the templates from CakePHP for displaying, editing, and adding entries in these 3 tables.
What I have - a series of files in the WWW directory of Wampserver for these views. These views are in CakePHP 'templates' (CTP files).
What I am trying to do - I have a series of HTML files which at the moment are totally separate from the CTP files. How can I incorporate the Views from the CakePHP templates into my HTML files? I've tried including the CTP files within an IFrame, but I get nothing. There are so many files in the Views that I cannot understand which bits of code I need to lift, or how I can otherwise access the Views from within my own HTML files.
I have gone round and round in circles trying to work this out, any help just to get me going in the right direction would be enormously helpful.
Basically, lets say i have a webserver and i resell hosting specifically for local churches.
i have 5 churches as clients, i have a simple CMS made for them they are equal copies of the same files, for each website i install the CMS , database and the website, i think it's a waste of resources.
i would like to know if i can do the following, afaik most webhosts have the following structure:
A main directory (home)
www.church1.com (church1)
www.church2.com (church2)
www.church3.com (church3)
www.church4.com (church4)
www.church5.com (church5)
basically i want the CMS to be on the Home directory, and each one of the Churches (clients) would only have a Config file, a Database ant the template regarding their websites.
so the system source code would be shared, but the website design and the database files would be completelly separated.
i'm not a webhosting or a development expert, but i know my way around, i'm sorry if the question is too basic, i'm having a hard time finding if this is possible.
EDIT: I Think Rudu's reference pretty much solved my problem!
Since you are building it yourself, put the include files (application logic) in a folder or include path that is accessible to all the domains. Then you can put your template files, images and stylesheets in the individual domain folders. If you are database driven you can check the domain $_SERVER['HTTP_HOST'] and load results from a certain table or database based off of that. You really can go a lot of different directions here if you are building it yourself.
It is possible - the answer. Exactly - there are some settings ( and now i dont remember them ) that can block it - but set up in all sites that libraries are there and be happy