Show the page
Hi,
I have one php file, that is having this line <img src="/home/huamin/Downloads/emu_wild_animal_bird.jpg" alt="picture description here"> inside. How to refer to this PHP file, for displaying the page, within one browser? |
So if you have a php file named image.php in the document root of your local server you can call ist
http://127.0.0.1/image.php or http://localhost/image.php and the contents of image.php may look like this Quote:
|
I copy the .php file to /root, but then I've got this
https://dl.dropboxusercontent.com/u/40211031/tt292.png |
Quote:
|
The same php file now exists on both
/var/www/html/ and /var/www/ but I still get the same problem, when going to both of these http://localhost/info3.php http://127.0.0.1/info3.php |
You don't have a webserver running on your PC or it is not started. Then you would need PHP too. The .php file needs to be in the configured document root and must be owned by the user who runs the webserver (usually www-run on RH based distributions). Also, the picture you're referring to in your php file needs to be accessible by the www-run.
You really should have asked that question in the Newbie Forum. You don't have problems with the software itself. Please solve the problems above and post error messages when you have problems with any of the steps. What do you want to achieve anyway? If it's only to see that picture, there are easier ways to do this... |
which distribution of linux is running on that machine? We still have not found the document root of the server...
Could be in /srv/www or /srv/www/html |
please READ and STUDY the Apache docs
http://httpd.apache.org/docs/2.4/ this is a bit COMPLICATED software |
Many thanks all.
I've done this [root@CentOS65x64 html]# cp info3.php /srv/www [root@CentOS65x64 html]# cp info3.php /srv/www/html cp: accessing `/srv/www/html': Not a directory [root@CentOS65x64 html]# but I still have the problem to go to these http://localhost/info3.php http://127.0.0.1/info3.php |
All times are GMT -5. The time now is 09:47 AM. |