Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I have a page /home/practice.php . On the page, i have elements with assigned id's. I want to refer to the elements . For example, practice.php/#footer , but all the content from the page disappears and i get a blank page . Even if i just put a slash, i.e practice.php/ , nothing shows up on the page.
This entirely depends on how you've set your page up, but just as with any HTML page you should be able to refer to:
page.php#anchor
Where anchor refers to an id within the page.
Note the lack of / before the #
Your file is practice.php. Placing a / at the end will make your browser treat practice.php as a folder instead. If you want to use #footer in your URL, simply use practice.php#footer.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I need to be able to have my main page (index.php) check every 10 seconds for a change in the mysql database table 'refresh'. If the 'refresh' value is 1 it needs to refresh the page in its entirety. If the value is zero it does nothing. I would use meta-refresh but I cannot have the page always refreshing as the page has a slider and it would mess up the rotation. Please let me know what you think of! Thanks in advance!
Use AJAX to check if an update is required.
http://api.jquery.com/jQuery.ajax/
You should learn the basic how to's of AJAX before using something like jQuery when you don't even know what's going on.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Improve this question
I'm working on a website that was originally built using codeigniter. It's a mess on the back end and there's no identifiers to anything really. I've recently changed a banner (header.php) and edited the style to fit as required. I added a simple img source= and a href= into the header.php and it seems to be displaying fine on the homepage. However once I navigate away to other pages the img source isn't displaying whilst all my other changes are?
The a href link remains with the class but the image is displaying as broken.
I've checked all the locations etc and it's all pointing to the correct place?
Any ideas?
I understood that you have given relative path to your image directory. You have to prepend base_url in src tag as follows
<img src="<?php echo base_url('/path/to/image.jps');?>" alt="Image"/>
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I have this link viewdocument.php?a=http%3A%2F%2Fwww.iesalfonsox.com%2Fimages%2FLIBROS_ESO_13-14.pdf in (for example) index.php and I want to put only the URL of the document of the link.
Example:
Link: http://www.myweb.com/viewdocument.php?a=some.pdf
On the HTML: You're viewing "Some.pdf".
Do you understand? Convert "viewdocument.php?a=some.pdf" to "some.pdf".
If this is the current URL being accessed on your site, Php provide globals and you can access it using the $_GET variable:
so for your example you will use this:
$file = $_GET['a']; // will return some.pdf
The other case will be for parsing a url from a string, for which php provides a function:
parse_url();
Follow the link to see examples
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 8 years ago.
Improve this question
This is not a duplicate.
Neither one of these methods work
CodeIgniter view loading not loading in order?
Codeigniter View and echo
$this->load->view('includes/header');
$this->load->view('includes/left_sidebar');
$this->load->view('content/content');
$this->load->view('includes/footer');
I've tried the 'echo' suggestion in the two links both with the second parameter as null and as array();
No matter what I do, the sidebar always loads at the bottom.
I've also tried loading these views within the content view with no luck.
I am using CodeIgniter 2.14, Any other suggestions for getting the views to load in the correct order?
There is no php functionality other than loading the includes.
check your css for sidebar. Check source code of the rendered page and see if sidebar section is at the bottom or at right place.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
how do I force a user to go back twice on a mobile web page using PHP or jAVASCRIPT without the user clicking any link or button.
something like using history.back() without a user having to click on anything
In javascript
function goBackTwice()
{
window.history.go(-2)
}
You may want to look into https://github.com/browserstate/history.js/ for a more robust client side solution.