How to call css or js file from
/app
/webroot
/bootstrap
/bootstrap.css
if i added
echo $this->Html->css('bootstrap');
code in view/Locale/default.ctp its working fine .. but bootstrap.css file not taking from bootstrap folder .
If i copied bootstrap.css in webroot/css folder its working fine ..
I am fresher for cakephp . Can anyone help me to resolve issue
The path that you provide in $this->Html->css() is the path of webroot, If you have a sub-folder under webroot, and the css file is in the sub-folder,you have to specify the sub-folder name, like this:
$this->Html->css('bootstrap/bootstrap');
use this hope this Help
$this->Html->css('/bootstrap/bootstrap');
Related
if my main.php file is located inside /wp-content/plugins/myplugin/folder/folder/folder/
why including urls.php , located inside /wp-content/uploads/folder/ doesn't work with this path:
include_once("../../../../../uploads/folder/urls.php");
it works only if placed inside same folder as main.php with path ('urls.php');
you can use content_url() it's located with http://www.example.com/wp-content wp-content folder.
Or for path
you can use WP_CONTENT_DIR it'll located to wp-content folder.
require_once(WP_CONTENT_DIR. 'uploads/folder/urls.php');
Check more info Documentation
It seems strange. Do you have any error message when you run your main.php?
Try to check again, maybe a typo somewhere. Do you take help of Text editor auto-completion when calling urls.php?
I am trying to install Laravel 5.3 in sub domain /public_html/mysite
but it's not working should I change .htaccess or what ?
Put the content of public (L5) directly on public_html (be aware of don't overwrite the .htaccess file accidentally) Now in then modify your index.php and your bootstrap.php and it will work just fine
I hope #Nino Armani gave you the right answer. Although you can try with visual video tutorial here-
http://www.tisuchi.com/upload-laravel-projecy-cpanel/
Move everything from project/public folder to project/ folder
Update index.php to have bootstrap path like "./bootstrap"
Add base APP_URL in your .env
Update layout folder paths like {{URL::to('/css/app.css')}}
I have a file structure that looks like this (unimportant files left out):
Testserver
-file.php
PHP
-functions.php
Administration
-index.php
Now when I try to call require_once('../PHP/functions.php'); inside the "index.php" it doesn't work and I don't understand why. Anyone an idea what the problem could be?
This works fine:
require_once('../file.php');
first thanks for all the answers, I found the bug now:
inside the functions.php I require another file and the path to that file wasn't correct when I called it from index.php
So I had to change the path inside functions.php not inside index.php.
Still thanks to everyone for the other suggestions :)
Do you get an PHP error, and if what does it say?
Check for lowercase/uppercase problems
The following should work correctly:
require_once('../PHP/functions.php');
Check your privileges on the folder and try:
require_once('../PHP/functions.php')
You have a Folder Structure Like so:
Testserver
-file.php
PHP
-functions.php
Administration
-index.php
And then, you are inside of index.php trying to Access the File functions.php, which lives inside of the Directory PHP. Then you need to go up one Directory from the current directory of the index.php File (ie. The Administration Directory) [meaning that you get up to Testserver Folder from theAdministration Folder] and then drill down to the PHP Directory. In code this would mean:
<?php
require_once __DIR__ . "/../PHP/functions.php";
Hope this does it for you.
Cheers & Good Luck....
I'm unable to include files in a folder from the root. Here's something similar to what I'm trying to do.
Root:
-folder1
--folder2 (I need to include stuff in this folder)
-otherfolder1
--otherfolder2
--otherfolder3 (This is my website folder)
This is what I have for my path so far which doesn't work.
define("FOLDER2_ROOT", "/folder1/folder2/");
../ is used to go up one folder.
So according to your situation, you need the following code:
include("../../../folder1/folder2/abc.php");
http://kohanaframework.org/3.0/guide/kohana/tutorials/clean-urls
following this tutorial, i managed to remove index.php from the url. I edited the "base_url" in bootstrap.php and the edited the .htaccess according to the tutorial. But now, I'm having a problem. my pages now can't load any of my css and js files included.
The picture there shows what happened.
Make your assets folder public. Do not store inside the application directory.