NME Posted February 14, 2007 Share Posted February 14, 2007 simple question. i made a php.ini, how do i get all my pages to link to it? do i just put it in the root folder of the server? Link to comment https://forums.phpfreaks.com/topic/38417-how-to-link-phpini/ Share on other sites More sharing options...
TheFilmGod Posted February 14, 2007 Share Posted February 14, 2007 You could just insert code to each page linking to it, or you can create a dynamic site with an element "php_include(element.php)" - that links to php.ini. And then that would allow each page to be linked to it. Then you can change one element and all pages change by that element. I hope you know what I mean! Link to comment https://forums.phpfreaks.com/topic/38417-how-to-link-phpini/#findComment-184281 Share on other sites More sharing options...
NME Posted February 14, 2007 Author Share Posted February 14, 2007 ok i kinda get what ur talking about. when i make this element.php i should basically put in something like include ' php.ini'; ? or something else. sorry i just dont understand how to literally link the php.ini page. Link to comment https://forums.phpfreaks.com/topic/38417-how-to-link-phpini/#findComment-184287 Share on other sites More sharing options...
TheFilmGod Posted February 14, 2007 Share Posted February 14, 2007 okay so here's a basic page: <body> <?php include('element.php') ?> </body> let us say elment.php reads: ABCDEFGHIJK so then the output by the server is: <body> ABCDEFGHIJK </body> That is how php include works. Elment.php must be in the same folder as the page your working on. So here's how you would do it: <body> <?php include('element.php') ?> </body> and have element.php read: <a href="php.ini">php.ini</a> .................. and the final output would be: <body> <a href="php.ini">php.ini</a> </body> So if you use php include on all pages then one file change, changes all the pages' linkage. Thats how it works. ** I don't really know how you are linking to php.ini but thats an example! Link to comment https://forums.phpfreaks.com/topic/38417-how-to-link-phpini/#findComment-184294 Share on other sites More sharing options...
TheFilmGod Posted February 14, 2007 Share Posted February 14, 2007 sorry, <a href="php.ini">php.ini</a> [/url] just popped out. I didn't put that in. its not supposed to be there! Link to comment https://forums.phpfreaks.com/topic/38417-how-to-link-phpini/#findComment-184297 Share on other sites More sharing options...
NME Posted February 14, 2007 Author Share Posted February 14, 2007 haha crap i dont think thats what i meant. my problem is that i added a php.ini file to my server, but now when i do phpinfo(); it still shows information from the default php.ini that my webhost uses. Link to comment https://forums.phpfreaks.com/topic/38417-how-to-link-phpini/#findComment-184305 Share on other sites More sharing options...
fert Posted February 14, 2007 Share Posted February 14, 2007 most webhosts don't let you have your own php.ini you need to use ini_set Link to comment https://forums.phpfreaks.com/topic/38417-how-to-link-phpini/#findComment-184308 Share on other sites More sharing options...
NME Posted February 14, 2007 Author Share Posted February 14, 2007 ok i figured that might be a problem. so i put this in: ini_set("upload_max_filesize", "8M"); does that seem alright? i just want to increase the max_filesize to 8MB from 2 MB standard. Link to comment https://forums.phpfreaks.com/topic/38417-how-to-link-phpini/#findComment-184310 Share on other sites More sharing options...
fert Posted February 14, 2007 Share Posted February 14, 2007 yep, looks alright, just make sure you put it at the topic of your script. Link to comment https://forums.phpfreaks.com/topic/38417-how-to-link-phpini/#findComment-184311 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.